Commit 28247609 authored by Davis King's avatar Davis King

Made the search for pyhton3 libraries more robust.

parent a80aaf18
...@@ -55,10 +55,14 @@ if (NOT WIN32) ...@@ -55,10 +55,14 @@ if (NOT WIN32)
/usr/lib/x86_64-linux-gnu/) /usr/lib/x86_64-linux-gnu/)
endif() endif()
if (PYTHON3) if (PYTHON3)
# on Some systems the boost python3 module is called python-py34 so check for that one. # On some systems the boost python3 module is called python-py34 so check
# for that one. Then if you don't find that then look for a few other
# names before findly trying just "python".
FIND_PACKAGE(Boost 1.41.0 COMPONENTS python-py34 ) FIND_PACKAGE(Boost 1.41.0 COMPONENTS python-py34 )
if (NOT Boost_FOUND) if (NOT Boost_FOUND)
# But if you don't find it then try looking for a module called python. FIND_PACKAGE(Boost 1.41.0 COMPONENTS python3)
endif()
if (NOT Boost_FOUND)
FIND_PACKAGE(Boost 1.41.0 COMPONENTS python) FIND_PACKAGE(Boost 1.41.0 COMPONENTS python)
endif() endif()
FIND_PACKAGE(PythonLibs 3.4 REQUIRED) FIND_PACKAGE(PythonLibs 3.4 REQUIRED)
...@@ -117,6 +121,8 @@ else() ...@@ -117,6 +121,8 @@ else()
INCLUDE_DIRECTORIES("${PYTHON_INCLUDE_DIRS}" ) INCLUDE_DIRECTORIES("${PYTHON_INCLUDE_DIRS}" )
endif() endif()
message(STATUS "USING BOOST_LIBS: ${Boost_LIBRARIES}")
message(STATUS "USING PYTHON_LIBS: ${PYTHON_LIBRARIES}")
if (CMAKE_COMPILER_IS_GNUCXX) if (CMAKE_COMPILER_IS_GNUCXX)
# Just setting CMAKE_POSITION_INDEPENDENT_CODE should be enough to set # Just setting CMAKE_POSITION_INDEPENDENT_CODE should be enough to set
......
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