Commit 0e9dd332 authored by Antoine Regimbeau's avatar Antoine Regimbeau

Not so sexy fix for lib python

parent b5f3fb63
Pipeline #317 passed with stage
in 26 minutes and 19 seconds
......@@ -109,7 +109,15 @@ if ( OTB_WRAP_PYTHON )
message (WARNING "Python3 not found. There is no longer support of \
wrapping in python2 in OTB, but it can still be used.")
endif()
find_package ( PythonLibs ${PYTHON_VERSION_MAJOR} REQUIRED )
# Windows lib has two libs since python 3
# one is python3.lib the other is python35.lib
# we want python35.lib so we need to force it.
if ( (NOT UNIX) AND ${PYTHON_VERSION_MAJOR} EQUAL 3 )
unset( Python_ADDITIONAL_VERSIONS )
find_package ( PythonLibs ${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR} REQUIRED )
else()
find_package ( PythonLibs ${PYTHON_VERSION_MAJOR} REQUIRED )
endif()
else()
# If NOT OTB_WRAP_PYTHON we still need python for testing but it is okay if
# the find package fail
......
......@@ -388,7 +388,12 @@ if ( OTB_WRAP_PYTHON )
message (WARNING "Python3 not found. There is no longer support of \
wrapping in python2 in OTB, but it can still be used.")
endif()
find_package ( PythonLibs ${PYTHON_VERSION_MAJOR} REQUIRED )
if ( (NOT UNIX) AND ${PYTHON_VERSION_MAJOR} EQUAL 3 )
unset( Python_ADDITIONAL_VERSIONS )
find_package ( PythonLibs ${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR} REQUIRED )
else()
find_package ( PythonLibs ${PYTHON_VERSION_MAJOR} REQUIRED )
endif()
else()
find_package( PythonInterp QUIET )
find_package ( PythonLibs ${PYTHON_VERSION_MAJOR} QUIET )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment