Moved boost library search to the main CMakeLists.txt file, so cmake knows right...
authorGuilherme Maciel Ferreira <guilherme.maciel.ferreira@intra2net.com>
Wed, 23 Feb 2011 14:22:05 +0000 (15:22 +0100)
committerGuilherme Maciel Ferreira <guilherme.maciel.ferreira@intra2net.com>
Wed, 23 Feb 2011 14:22:05 +0000 (15:22 +0100)
CMakeLists.txt
src/CMakeLists.txt

index 877ebe6..86d0f55 100644 (file)
@@ -6,6 +6,9 @@ set( MAJOR_VERSION 0 )
 set( MINOR_VERSION 1 )
 set( VERSION_STRING ${MAJOR_VERSION}.${MINOR_VERSION} )
 
+# build type
+set( CMAKE_BUILD_TYPE Debug )
+
 # set the directory where the executable will be placed
 set( CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} )
 
@@ -15,13 +18,17 @@ set( CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} )
 # enable or disable the full compiler output
 set( CMAKE_VERBOSE_MAKEFILE OFF )
 
-set( CMAKE_BUILD_TYPE Debug )
-
 # add definitions, compiler switches, etc.
 add_definitions(
     -Werror -Wall -Wextra -Weffc++ -O2 -DVERSION_STRING=${VERSION_STRING}
     -DPROJECT_NAME=\"${PROJECT_NAME}\"
 )
 
-# more build in the source folder
+# required boost libraries
+set( Boost_USE_STATIC_LIBS ON )
+set( Boost_USE_MULTITHREADED ON )
+set( Boost_USE_STATIC_RUNTIME OFF )
+find_package( Boost COMPONENTS filesystem program_options REQUIRED )
+
+# build the application in the source directory
 add_subdirectory( src )
index bfc5dce..bca280b 100644 (file)
@@ -1,17 +1,11 @@
-# required boost libraries
-set( Boost_USE_STATIC_LIBS ON )
-set( Boost_USE_MULTITHREADED ON )
-set( Boost_USE_STATIC_RUNTIME OFF )
-find_package( Boost COMPONENTS filesystem program_options REQUIRED )
-
-# include directories
+# include directories where the source code is located
 include_directories(
     config
     ping
     ${Boost_INCLUDE_DIRS}
 )
 
-# source code
+# source code files
 set( SOURCES
     config/configuration.cpp
     config/configurationreader.cpp