-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
55 lines (45 loc) · 1.58 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
53
54
55
cmake_minimum_required(VERSION 3.5.2)
include(CheckCXXCompilerFlag)
project(cavestory-nx)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/src/cmake/")
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR})
find_package(SDL2 REQUIRED)
find_package(SDL2_mixer REQUIRED)
find_package(PNG REQUIRED)
include_directories(${SDL2_INCLUDE_DIR})
include_directories(${PNG_PNG_INCLUDE_DIR})
file(GLOB APP_SOURCES "src/[a-zA-Z]*.cpp")
file(GLOB TB_SOURCES "src/TextBox/[a-zA-Z]*.cpp")
file(GLOB_RECURSE AI_SOURCES "src/ai/[a-zA-Z]*.cpp")
file(GLOB AG_SOURCES "src/autogen/[a-zA-Z]*.cpp")
file(GLOB CM_SOURCES "src/common/[a-zA-Z]*.cpp")
file(GLOB EG_SOURCES "src/endgame/[a-zA-Z]*.cpp")
file(GLOB GR_SOURCES "src/graphics/[a-zA-Z]*.cpp")
file(GLOB IN_SOURCES "src/intro/[a-zA-Z]*.cpp")
file(GLOB PA_SOURCES "src/pause/[a-zA-Z]*.cpp")
file(GLOB SL_SOURCES "src/siflib/[a-zA-Z]*.cpp")
file(GLOB SN_SOURCES "src/sound/[a-zA-Z]*.cpp")
file(GLOB I18N_SOURCES "src/i18n/[a-zA-Z]*.cpp")
include_directories(${cavestory-nx_SOURCE_DIR})
set(SOURCES
${APP_SOURCES}
${TB_SOURCES}
${AI_SOURCES}
${AG_SOURCES}
${CM_SOURCES}
${EG_SOURCES}
${GR_SOURCES}
${IN_SOURCES}
${PA_SOURCES}
${SL_SOURCES}
${SN_SOURCES}
${I18N_SOURCES}
)
if(CMAKE_BUILD_TYPE MATCHES Debug)
message("debug mode")
add_definitions(-DTRACE_SCRIPT)
add_definitions(-DDEBUG)
endif()
add_definitions("-std=gnu++14 -Wall -Wno-unused-result -Wno-maybe-uninitialized")
add_executable(cavestory-nx ${SOURCES})
target_link_libraries(cavestory-nx ${SDL2_LIBRARY} ${SDL_MIXER_LIBRARY} ${PNG_LIBRARY})