1
0
mirror of https://github.com/rwengine/openrw.git synced 2024-09-15 06:52:34 +02:00

cmake: be more specific about Boost library to link with

CMake 3.2's FindBoost.cmake does not support boost:: namespaces
This commit is contained in:
Anonymous Maarten 2017-10-26 01:47:29 +02:00 committed by Daniel Evans
parent 66a28acaa4
commit e555331748
3 changed files with 9 additions and 4 deletions

View File

@ -48,6 +48,7 @@ add_executable(rwgame
target_include_directories(rwgame
SYSTEM
PRIVATE
${Boost_INCLUDE_DIRS}
${BULLET_INCLUDE_DIR}
${OPENAL_INCLUDE_DIR}
)
@ -60,7 +61,7 @@ target_include_directories(rwgame
target_link_libraries(rwgame
PRIVATE
rwengine
${Boost_LIBRARIES}
${Boost_PROGRAM_OPTIONS_LIBRARY}
${OPENGL_LIBRARIES}
${BULLET_LIBRARIES}
SDL2::SDL2

View File

@ -50,7 +50,7 @@ target_include_directories(rwlib
target_include_directories(rwlib
SYSTEM
PUBLIC
"${Boost_INCLUDE_DIRS}"
${Boost_INCLUDE_DIRS}
)
target_link_libraries(rwlib
@ -58,5 +58,6 @@ target_link_libraries(rwlib
openrw::interface
PRIVATE
${OPENGL_LIBRARIES}
${Boost_LIBRARIES}
${Boost_FILESYSTEM_LIBRARY}
${Boost_SYSTEM_LIBRARY}
)

View File

@ -2,7 +2,7 @@
# Unit Tests
##############################################################################
find_package(Boost COMPONENTS filesystem unit_test_framework REQUIRED)
find_package(Boost COMPONENTS filesystem unit_test_framework system REQUIRED)
set(TEST_SOURCES
main.cpp
@ -59,6 +59,7 @@ target_compile_definitions(run_tests
target_include_directories(run_tests
SYSTEM
PRIVATE
${Boost_INCLUDE_DIRS}
${BULLET_INCLUDE_DIR}
)
@ -75,7 +76,9 @@ target_link_libraries(run_tests
${BULLET_LIBRARIES}
SDL2::SDL2
${PNG_LIBRARIES}
${Boost_FILESYSTEM_LIBRARY}
${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}
${Boost_SYSTEM_LIBRARY}
)
add_test(UnitTests run_tests)