Fine tuning linking strategy
static linking on Windows (MSVC and mingw) dyn linking everywhere else.
This commit is contained in:
@@ -9,11 +9,13 @@ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
|
||||
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
|
||||
|
||||
|
||||
IF(MSVC)
|
||||
set (Boost_USE_STATIC_LIBS OFF)
|
||||
#Prep ourselves for compiling boost
|
||||
IF(WIN32)
|
||||
set(Boost_USE_STATIC_LIBS ON)
|
||||
ELSE(TRUE)
|
||||
set(Boost_USE_STATIC_LIBS OFF)
|
||||
add_definitions(-DBOOST_ALL_DYN_LINK)
|
||||
ENDIF(MSVC)
|
||||
|
||||
ENDIF(WIN32)
|
||||
|
||||
find_package(Boost COMPONENTS unit_test_framework)
|
||||
include_directories (${Boost_INCLUDE_DIRS} ../../src/)
|
||||
|
||||
Reference in New Issue
Block a user