mirror of
https://github.com/eclipse/upm.git
synced 2025-03-15 04:57:30 +03:00
python: Fixes for building python modules
Moved src include AFTER setter for PYTHONBUILD_VERSION. In this way, the src CMakeLists has a valid PYTHONBUILD_VERSION str. Call find_package on PythonInterp prior to finding the libs (recommended). Signed-off-by: Noel Eck <noel.eck@intel.com>
This commit is contained in:
parent
9a74a3b4f5
commit
19b0b0c2f1
@ -231,8 +231,6 @@ if (RPM)
|
|||||||
include(CPack)
|
include(CPack)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_subdirectory (src)
|
|
||||||
|
|
||||||
if(BUILDEXAMPLES)
|
if(BUILDEXAMPLES)
|
||||||
add_subdirectory (examples/c++)
|
add_subdirectory (examples/c++)
|
||||||
endif()
|
endif()
|
||||||
@ -249,6 +247,8 @@ if (BUILDSWIGPYTHON OR BUILDTESTS)
|
|||||||
endif ()
|
endif ()
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
add_subdirectory (src)
|
||||||
|
|
||||||
if (BUILDTESTS)
|
if (BUILDTESTS)
|
||||||
find_package (PythonInterp ${PYTHONBUILD_VERSION} REQUIRED)
|
find_package (PythonInterp ${PYTHONBUILD_VERSION} REQUIRED)
|
||||||
enable_testing ()
|
enable_testing ()
|
||||||
|
@ -178,7 +178,8 @@ endmacro()
|
|||||||
if (SWIG_FOUND)
|
if (SWIG_FOUND)
|
||||||
if (BUILDSWIGPYTHON)
|
if (BUILDSWIGPYTHON)
|
||||||
if(NOT PYTHONLIBS_FOUND)
|
if(NOT PYTHONLIBS_FOUND)
|
||||||
find_package (PythonLibs ${PYTHONBUILD_VERSION} REQUIRED)
|
find_package (PythonInterp ${PYTHONBUILD_VERSION} EXACT REQUIRED)
|
||||||
|
find_package (PythonLibs ${PYTHONBUILD_VERSION} EXACT REQUIRED)
|
||||||
string (REPLACE "." ";" PYTHON_VERSION_LIST ${PYTHONLIBS_VERSION_STRING})
|
string (REPLACE "." ";" PYTHON_VERSION_LIST ${PYTHONLIBS_VERSION_STRING})
|
||||||
list (GET PYTHON_VERSION_LIST 0 PYTHON_VERSION_MAJOR)
|
list (GET PYTHON_VERSION_LIST 0 PYTHON_VERSION_MAJOR)
|
||||||
list (GET PYTHON_VERSION_LIST 1 PYTHON_VERSION_MINOR)
|
list (GET PYTHON_VERSION_LIST 1 PYTHON_VERSION_MINOR)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user