From d66cd591802794af617ea6b94e237b6480b877e7 Mon Sep 17 00:00:00 2001 From: Adam Wardynski <award@.(win7-laptop)> Date: Mon, 29 Nov 2010 23:46:54 +0100 Subject: [PATCH] Using auto-link boost feature in MSVC or BORLAND. --- CMakeLists.txt | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 62817ba..089d20a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -46,7 +46,16 @@ include_directories(${WCCL_SOURCE_DIR}) set(LIBWCCL_VERSION "${ver_major}.${ver_minor}.${ver_patch}") -find_package(Boost 1.41 REQUIRED COMPONENTS program_options filesystem regex) +find_package(Boost 1.41 REQUIRED COMPONENTS program_options system filesystem regex) + +if(MSVC OR BORLAND) +# Use the auto-linking feature, don't try to add libraries yourself: + set(Boost_LIBRARIES "") +# Note the default is to link static libs and it is left like that here. +# You can make it link to DLL by defining BOOST_#module#_DYN_LINK +# in C++ source file or somewhere in CMake file, e.g. +# add_definitions( -DBOOST_FILESYSTEM_DYN_LINK ) +endif(MSVC OR BORLAND) add_subdirectory(libwccl) add_subdirectory(wcclparser) -- GitLab