Changed cmake python library search startegy for crosscompiling
This commit is contained in:
parent
ffd1df0cb5
commit
2c2cdcf789
@ -83,7 +83,12 @@ function(find_python preferred_version min_version library_env include_dir_env
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
# not using _version_string here, because it might not conform to the CMake version format
|
# not using _version_string here, because it might not conform to the CMake version format
|
||||||
find_host_package(PythonLibs "${_version_major_minor}.${_version_patch}" EXACT)
|
if(CMAKE_CROSSCOMPILING)
|
||||||
|
# builder version can differ from target, matching base version (e.g. 2.7)
|
||||||
|
find_host_package(PythonLibs "${_version_major_minor}")
|
||||||
|
else()
|
||||||
|
find_host_package(PythonLibs "${_version_major_minor}.${_version_patch}" EXACT)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(PYTHONLIBS_FOUND)
|
if(PYTHONLIBS_FOUND)
|
||||||
# Copy outputs
|
# Copy outputs
|
||||||
|
Loading…
x
Reference in New Issue
Block a user