From 4db092cee0ea80a62c61e92d4657046b87e7e1cd Mon Sep 17 00:00:00 2001 From: Willem Jan Withagen Date: Tue, 3 Jan 2017 15:08:25 +0100 Subject: [PATCH] CMakeLists.txt/FreeBSD: Boost_python needs explicit linking with libpython*.so - Otherwise losts of unresolved errors will result. Signed-off-by: Willem Jan Withagen --- CMakeLists.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 565547c2c5919..90debd85164db 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -477,7 +477,12 @@ find_package(Boost 1.61 COMPONENTS ${BOOST_COMPONENTS} REQUIRED) include_directories(SYSTEM ${Boost_INCLUDE_DIRS}) include_directories(SYSTEM ${PROJECT_BINARY_DIR}/include) -if (NOT WITH_SYSTEM_BOOST) +if (WITH_SYSTEM_BOOST) + if(FREEBSD) + # if boost_python is used then also link with libpython* + LIST(APPEND Boost_LIBRARIES ${PYTHON_LIBRARIES}) + endif() +else() LIST(APPEND Boost_LIBRARIES "-lz") endif() -- 2.39.5