Skip to content

Commit

Permalink
cmake: fix the include dir for building boost::python
Browse files Browse the repository at this point in the history
the "includes" directories are separated by spaces not semicolons.

Signed-off-by: Kefu Chai <[email protected]>
  • Loading branch information
tchaikov committed Feb 5, 2018
1 parent d8ba486 commit 2277a10
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cmake/modules/BuildBoost.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,13 @@ function(do_build_boost version)
" : ${CMAKE_CXX_COMPILER}"
" ;\n")
if(with_python GREATER -1)
set(python_ver ${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR})
string(REPLACE ";" " " python_includes "${PYTHON_INCLUDE_DIRS}")
file(APPEND ${user_config}
"using python"
" : ${python_ver}"
" : ${PYTHON_EXECUTABLE}"
" : ${PYTHON_INCLUDE_DIRS}"
" : ${python_includes}"
" : ${PYTHON_LIBRARIES}"
" ;\n")
endif()
Expand All @@ -107,7 +109,6 @@ function(do_build_boost version)
message(FATAL_ERROR "Please call find_package(PythonLibs) first for building "
"Boost.Python")
endif()
set(python_ver ${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR})
list(APPEND b2 python=${python_ver})
endif()

Expand Down

0 comments on commit 2277a10

Please sign in to comment.