Find Boost libraries instead of hardcoding
authorDuncan Mac-Vicar P <dmacvicar@suse.de>
Wed, 18 May 2011 12:01:47 +0000 (12:01 +0000)
committerDuncan Mac-Vicar P <dmacvicar@suse.de>
Wed, 18 May 2011 12:01:47 +0000 (12:01 +0000)
Fixes linking when -mt version is not available

CMakeLists.txt
tools/CMakeLists.txt

index 7d67706..b281b70 100644 (file)
@@ -81,7 +81,7 @@ ELSE ( NOT RPM_FOUND)
   endif ( RPM_SUSPECT_VERSION STREQUAL "5.x" )
 ENDIF( NOT RPM_FOUND)
 
-FIND_PACKAGE(Boost REQUIRED)
+FIND_PACKAGE(Boost REQUIRED COMPONENTS program_options unit_test_framework)
 IF (Boost_FOUND)
   MESSAGE( STATUS "boost found: includes in ${Boost_INCLUDE_DIRS}, library in ${Boost_LIBRARY_DIRS}")
   INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS})
index f37993e..2c2a3da 100644 (file)
@@ -13,7 +13,7 @@ FOREACH( loop_var ${APLLPROG} )
   )
   TARGET_LINK_LIBRARIES( ${loop_var}
     zypp
-    boost_program_options-mt
+    ${Boost_PROGRAM_OPTIONS_LIBRARY}
   )
 ENDFOREACH( loop_var )