diff --git a/CMakeLists.txt b/CMakeLists.txt index 2bca7b541..27c40da32 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -617,7 +617,8 @@ endif() # Boost find_package(Boost REQUIRED COMPONENTS system) -target_link_libraries(torrent-rasterbar PUBLIC Boost::system) +target_include_directories(torrent-rasterbar PUBLIC ${Boost_INCLUDE_DIRS}) +target_link_libraries(torrent-rasterbar PUBLIC ${Boost_SYSTEM_LIBRARY}) list(APPEND _package_dependencies "Boost COMPONENTS system") if (WIN32) diff --git a/bindings/python/CMakeLists.txt b/bindings/python/CMakeLists.txt index 87e3c2386..d02be0ed0 100644 --- a/bindings/python/CMakeLists.txt +++ b/bindings/python/CMakeLists.txt @@ -88,10 +88,11 @@ target_include_directories(python-libtorrent ${PYTHON_INCLUDE_DIRS} ) +string(TOUPPER "${boost-python-module-name}" boost_python_module_name_uppercase) target_link_libraries(python-libtorrent PRIVATE torrent-rasterbar - Boost::${boost-python-module-name} + ${Boost_${boost_python_module_name_uppercase}_LIBRARY} # Boost::python adds that but without a path to the library. Therefore we have to either # provide the path (but, unfortunately, FindPythonLibs.cmake does not return the library dir), # or give the full file name here (this FindPythonLibs.cmake provides to us).