3 cmake_minimum_required(VERSION 2.6)
4 if(COMMAND cmake_policy)
5 cmake_policy(SET CMP0003 NEW)
6 endif(COMMAND cmake_policy)
7 SET(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules;${CMAKE_MODULE_PATH}")
11 file(GLOB_RECURSE TED_FILES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "${TED_SRC}/*.c*")
13 find_package(SDL REQUIRED)
14 find_package(SDL_image REQUIRED)
15 find_package(OpenGL REQUIRED)
16 #find_package(FTGL REQUIRED)
18 if(CMAKE_SYSTEM_NAME MATCHES Windows)
19 #this is to fix some cross compiling issues I'm having
20 #set(SDL_INCLUDE_DIR FTGL_INCLUDE_DIR)
21 #set(SDLIMAGE_INCLUDE_DIR FTGL_INCLUDE_DIR)
22 endif(CMAKE_SYSTEM_NAME MATCHES Windows)
25 ${CMAKE_SOURCE_DIR}/${TED_SRC}
27 ${SDLIMAGE_INCLUDE_DIR}
29 #${FREETYPE_INCLUDE_DIRS}
42 -pipe -Wall -D_REENTRANT -D_GNU_SOURCE=1
45 if(BUILD MATCHES "Debug")
46 add_definitions(-DDEBUG -g)
47 message(STATUS "DEBUGGING ON!")
51 message(STATUS "PROFILING ON!")
53 endif(BUILD MATCHES "Debug")
55 if(BUILD MATCHES "Debug")
57 endif(BUILD MATCHES "Debug")
59 add_executable(${EXECUTABLE} ${TED_FILES})