-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
52 lines (39 loc) · 1.47 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
CMAKE_MINIMUM_REQUIRED(VERSION 3.12)
PROJECT(brickout)
ADD_COMPILE_DEFINITIONS(CE_SDL2_WINDOW_TITLE="Brickout :: by Modus Create")
SET(CMAKE_CXX_STANDARD 11)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-implicit-exception-spec-mismatch")
SET(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/creative-engine/cmake.files)
# Include Creative Engine
# Exports:
# ${CREATIVE_ENGINE_INCLUDE_DIRS} - used in INCLUDE_DIRECTORIES(...)
# ${CREATIVE_ENGINE_SOURCE_FILES} - used in ADD_EXECUTABLE(...)
# ${CREATIVE_ENGINE_LINK_LIBRARIES} - used in TARGET_LINK_LIBRARIES(...)
INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/creative-engine/CreativeEngine.cmake)
INCLUDE_DIRECTORIES(BRICKOUT_INCLUDE_DIRS
${CMAKE_SOURCE_DIR}/src
${CMAKE_SOURCE_DIR}/src/GameState
${CMAKE_SOURCE_DIR}/src/TitleState
${CMAKE_SOURCE_DIR}/src/MainOptionsState
${CMAKE_SOURCE_DIR}/src/SplashState
${CMAKE_SOURCE_DIR}/src/RulesState
${CMAKE_BINARY_DIR}/usr/local/include
)
INCLUDE_DIRECTORIES(
${BRICKOUT_INCLUDE_DIRS}
${CREATIVE_ENGINE_INCLUDE_DIRS}
)
# gather Brickout sources
FILE(GLOB_RECURSE BRICKOUT_SRC RELATIVE ${CMAKE_SOURCE_DIR} "src/*.cpp")
ADD_EXECUTABLE(
${PROJECT_NAME}
Resources.bin
${CREATIVE_ENGINE_SOURCE_FILES}
${BRICKOUT_SRC}
)
# make brickout.app
if (APPLE)
SET_TARGET_PROPERTIES(brickout PROPERTIES MACOSX_BUNDLE TRUE)
INSTALL(TARGETS brickout DESTINATION ".")
endif (APPLE)
TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${CREATIVE_ENGINE_LINK_LIBRARIES})