revert to use Boost variables in CMakeLists.txt

This commit is contained in:
Alden Torres 2018-04-30 10:50:10 -04:00 committed by Arvid Norberg
parent 377e800e72
commit cb8b32f353
2 changed files with 4 additions and 2 deletions

View File

@ -617,7 +617,8 @@ endif()
# Boost # Boost
find_package(Boost REQUIRED COMPONENTS system) 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") list(APPEND _package_dependencies "Boost COMPONENTS system")
if (WIN32) if (WIN32)

View File

@ -88,10 +88,11 @@ target_include_directories(python-libtorrent
${PYTHON_INCLUDE_DIRS} ${PYTHON_INCLUDE_DIRS}
) )
string(TOUPPER "${boost-python-module-name}" boost_python_module_name_uppercase)
target_link_libraries(python-libtorrent target_link_libraries(python-libtorrent
PRIVATE PRIVATE
torrent-rasterbar 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 # 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), # 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). # or give the full file name here (this FindPythonLibs.cmake provides to us).