Commits

Boris Nagaev committed c28a3d6
  • Participants
  • Parent commits 7203588

Comments (0)

Files changed (2)

 set(local_include_dir ${PROJECT_BINARY_DIR}/include)
 set(local_headers_dir ${local_include_dir}/Wt/Wc)
 
+set(Boost_USE_STATIC_LIBS OFF CACHE BOOL "Use static boost libs")
+set(Boost_USE_MULTITHREADED ON CACHE BOOL "Use multithreaded boost libs")
+set(Boost_USE_STATIC_RUNTIME OFF CACHE BOOL
+    "Use boost libs linked with static C++ standard library")
+set(boost_libs filesystem thread signals system program_options)
+find_package(Boost 1.42.0 COMPONENTS ${boost_libs} REQUIRED)
+
 set(datadir ${CMAKE_INSTALL_PREFIX}/share CACHE PATH "Root of data files")
 set(WT_DIR ${datadir}/Wt CACHE PATH "Wt installation dir")
 set(DOC_SUBDIR ${datadir}/doc/libwtclasses CACHE PATH "Docs subdir")

src/CMakeLists.txt

 
 include_directories(${CMAKE_CURRENT_BINARY_DIR})
 
-set(libs wt boost_filesystem boost_thread boost_signals boost_system
-    boost_program_options)
+set(libs wt ${Boost_LIBRARIES})
 
 if(WC_USE_OPENSSL)
     set(libs ${libs} ${OPENSSL_LIBRARIES})
 
 option(BUILD_STATIC_WC "Build static version of the library as well" ON)
 
+include_directories(${Boost_INCLUDE_DIRS})
+link_directories(${Boost_LIBRARY_DIRS})
+
 add_library(wtclasses SHARED ${wtclasses_sources})
 target_link_libraries(wtclasses ${libs})
 if(BUILD_STATIC_WC)