add Boost to CMake
authortuxdev <tuxdev@837edb03-e0f3-0310-88ca-d4d4e8b29345>
Sun, 13 Dec 2009 23:38:28 +0000 (23:38 +0000)
committertuxdev <tuxdev@837edb03-e0f3-0310-88ca-d4d4e8b29345>
Sun, 13 Dec 2009 23:38:28 +0000 (23:38 +0000)
git-svn-id: http://supertux.lethargik.org/svn/supertux/trunk/supertux@6210 837edb03-e0f3-0310-88ca-d4d4e8b29345

CMakeLists.txt

index 10b3e96..2657d9f 100644 (file)
@@ -58,6 +58,10 @@ TEST_BIG_ENDIAN(WORDS_BIGENDIAN)
 
 ## Add lots of dependencies to compiler switches
 
+FIND_PACKAGE(Boost REQUIRED)
+INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIR})
+LINK_DIRECTORIES(${Boost_LIBRARY_DIRS})
+
 FIND_PACKAGE(SDL REQUIRED)
 INCLUDE_DIRECTORIES(${SDL_INCLUDE_DIR})
 SET(HAVE_SDL TRUE)
@@ -187,9 +191,9 @@ OPTION(WARNINGS "Enable long list of warnings for compiler to check" ON)
 IF(CMAKE_COMPILER_IS_GNUCC)
   SET(CMAKE_CXX_FLAGS_DEBUG "-O0 -g")
   SET(CMAKE_C_FLAGS_DEBUG "-O0 -g")
-  SET(CMAKE_CXX_FLAGS_PROFILE "-pg")
-  SET(CMAKE_C_FLAGS_PROFILE "-pg")
-  SET(CMAKE_LD_FLAGS_PROFILE "-pg")
+  SET(CMAKE_CXX_FLAGS_PROFILE "${CMAKE_CXX_FLAGS_DEBUG} -pg")
+  SET(CMAKE_C_FLAGS_PROFILE "${CMAKE_C_FLAGS_DEBUG} -pg")
+  SET(CMAKE_LD_FLAGS_PROFILE "${CMAKE_LD_FLAGS_DEBUG} -pg")
   ADD_DEFINITIONS(-Wall -Wextra -funit-at-a-time)
   IF(WERROR)
     ADD_DEFINITIONS(-Werror)
@@ -446,6 +450,11 @@ MARK_AS_ADVANCED(
 )
 
 MARK_AS_ADVANCED(
+       Boost_INCLUDE_DIR
+       Boost_LIBRARIES
+)
+
+MARK_AS_ADVANCED(
        SDLMAIN_LIBRARY
        SDL_INCLUDE_DIR
        SDL_LIBRARY