From 811c8d167723081f65368a30f35811118b7e7fb3 Mon Sep 17 00:00:00 2001 From: tuxdev Date: Sun, 13 Dec 2009 23:38:28 +0000 Subject: [PATCH] add Boost to CMake git-svn-id: http://supertux.lethargik.org/svn/supertux/trunk/supertux@6210 837edb03-e0f3-0310-88ca-d4d4e8b29345 --- CMakeLists.txt | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 10b3e9684..2657d9f8a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 -- 2.11.0