File tree Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -13,23 +13,24 @@ if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
1313endif ()
1414
1515if (NOT ANDROID)
16- find_package (PythonLibs)
16+ find_package (PythonLibs REQUIRED )
1717 if (PYTHONLIBS_VERSION_STRING VERSION_LESS 3)
1818 find_package (Boost REQUIRED python)
1919 else ()
2020 find_package (Boost QUIET )
21- if (Boost_VERSION LESS 106500)
22- find_package (Boost REQUIRED python)
23- else ()
21+ if (Boost_VERSION LESS 106700)
2422 # This is a bit of a hack to suppress a warning
2523 # No header defined for python3; skipping header check
2624 # Which should only affect Boost versions < 1.67
2725 # Resolution for newer versions:
2826 # https://gitlab.kitware.com/cmake/cmake/issues/16391
29- if (Boost_VERSION LESS 106700)
30- set (_Boost_PYTHON3_HEADERS "boost/python.hpp" )
31- endif ()
32- find_package (Boost COMPONENTS python3 REQUIRED)
27+ set (_Boost_PYTHON3_HEADERS "boost/python.hpp" )
28+ find_package (Boost REQUIRED python)
29+ else ()
30+ string (REPLACE "." ";" VERSION_LIST ${PYTHONLIBS_VERSION_STRING} )
31+ list (GET VERSION_LIST 0 PYTHONLIBS_VERSION_MAJOR)
32+ list (GET VERSION_LIST 1 PYTHONLIBS_VERSION_MINOR)
33+ find_package (Boost COMPONENTS python${PYTHONLIBS_VERSION_MAJOR}${PYTHONLIBS_VERSION_MINOR} REQUIRED)
3334 endif ()
3435 endif ()
3536else ()
You can’t perform that action at this time.
0 commit comments