Commit 67eaa48a authored by Pino Toscano's avatar Pino Toscano
Browse files

cmake: fallback to "python" as boost component

In case there is no "python3" component, look for "python"; in case
it represents Python 2, it should be rejected by the build checks
later on.
parent 06cc76d4
......@@ -32,6 +32,13 @@ int main() { return 0; }
endmacro(BoostPython_TRY_COMPILE)
find_package(Boost QUIET COMPONENTS python3)
if(NOT Boost_PYTHON3_FOUND)
find_package(Boost QUIET COMPONENTS python)
if(Boost_PYTHON_FOUND)
set(Boost_PYTHON3_LIBRARY ${Boost_PYTHON_LIBRARY})
set(Boost_PYTHON3_FOUND TRUE)
endif(Boost_PYTHON_FOUND)
endif(NOT Boost_PYTHON3_FOUND)
cmake_push_check_state()
set(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} ${Boost_INCLUDE_DIRS})
......
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