-
Notifications
You must be signed in to change notification settings - Fork 7
/
CMakeLists.txt
35 lines (28 loc) · 1.16 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
PROJECT(freesiege)
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
INCLUDE(${CMAKE_ROOT}/Modules/FindSDL.cmake)
INCLUDE(${CMAKE_ROOT}/Modules/FindSDL_mixer.cmake)
INCLUDE(${CMAKE_ROOT}/Modules/FindSDL_ttf.cmake)
INCLUDE(${CMAKE_ROOT}/Modules/FindOpenGL.cmake)
INCLUDE_DIRECTORIES(${SDL_INCLUDE_DIR})
INCLUDE_DIRECTORIES(${SDLMIXER_INCLUDE_DIR})
INCLUDE_DIRECTORIES(${SDLTTF_INCLUDE_DIR})
INCLUDE_DIRECTORIES(${OPENGL_INCLUDE_DIR})
INCLUDE(common/CMakeLists.txt)
INCLUDE(engine/CMakeLists.txt)
INCLUDE(gui/CMakeLists.txt)
INCLUDE(units/CMakeLists.txt)
SET(FS_ALL_SRCS
${FS_COMMON_SRCS}
${FS_ENGINE_SRCS}
${FS_GUI_SRCS}
${FS_UNITS_SRCS}
)
OPTION(COMPILE_FOR_PACKAGE "Assume Freesiege will be installed to /usr/bin and /usr/share" OFF)
IF(COMPILE_FOR_PACKAGE)
ADD_DEFINITIONS(-DFREESIEGE_ISINSTALLED)
ENDIF(COMPILE_FOR_PACKAGE)
ADD_EXECUTABLE(fight fight.cpp ${FS_ALL_SRCS})
TARGET_LINK_LIBRARIES(fight ${SDLMIXER_LIBRARY} ${SDL_LIBRARY} ${SDLTTF_LIBRARY} ${OPENGL_gl_LIBRARY})
ADD_EXECUTABLE(freesiege freesiege.cpp ${FS_ALL_SRCS})
TARGET_LINK_LIBRARIES(freesiege ${SDLMIXER_LIBRARY} ${SDL_LIBRARY} ${SDLTTF_LIBRARY} ${OPENGL_gl_LIBRARY})