Skip to content

Commit

Permalink
Fix to prevent Boost from linking dynamic and static libraries simult…
Browse files Browse the repository at this point in the history
…aneously when autolink is enabled.
  • Loading branch information
OgreTransporter committed Apr 30, 2020
1 parent 68a49a0 commit 18421d5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ else()
endif()
include_directories(${Boost_INCLUDE_DIR})
link_directories(${Boost_LIBRARY_DIR_RELEASE})
if(NOT Boost_USE_STATIC_LIBS)
add_definitions(-DBOOST_ALL_DYN_LINK)
endif()

set(LIB_LIST
${CMAKE_THREAD_LIBS_INIT}
Expand Down
2 changes: 1 addition & 1 deletion test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ set(TEST_SRC_LIST

include_directories("${PROJECT_SOURCE_DIR}/test")
add_executable(${PROJECT_NAME}_test ${TEST_SRC_LIST})
target_link_libraries(${PROJECT_NAME}_test TgBot)
target_link_libraries(${PROJECT_NAME}_test ${PROJECT_NAME})
add_test(${PROJECT_NAME}_test ${PROJECT_NAME}_test)

0 comments on commit 18421d5

Please sign in to comment.