-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
84 lines (72 loc) · 1.86 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
cmake_minimum_required(VERSION 3.13)
project(flobopuyo C CXX)
set(DEFAULT_BUILD_TYPE "Release")
if(NOT CMAKE_CONFIGURATION_TYPES AND NOT (CMAKE_BUILD_TYPE OR DEFINED ENV{CMAKE_BUILD_TYPE}))
message(STATUS "Setting build type to '${DEFAULT_BUILD_TYPE}' as none was specified.")
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY VALUE "${DEFAULT_BUILD_TYPE}")
endif()
if (("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") OR ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang"))
add_compile_options(-Wall -Wextra -pedantic -Werror)
endif()
find_package(OpenGL REQUIRED)
find_package(SDL REQUIRED)
find_package(SDL_image REQUIRED)
find_package(SDL_mixer REQUIRED)
set(C_FILES
audio.c
glSDL.c
menu.c
menuitems.c
preferences.c
PuyoDoomMelt.c
PuyoVersion.c
scrollingtext.c
sofont.c
)
add_executable(flobopuyo
AnimatedPuyo.cpp
corona32.cpp
corona.cpp
corona_palette.cpp
GameControls.cpp
HiScores.cpp
InputManager.cpp
IosImgProcess.cpp
main.cpp
PuyoAnimations.cpp
PuyoCommander.cpp
PuyoGame.cpp
PuyoIA.cpp
PuyoLock.cpp
PuyoStarter.cpp
PuyoView.cpp
SDL_Painter.cpp
${C_FILES}
)
set_property(TARGET flobopuyo PROPERTY CXX_STANDARD 11)
set_property(TARGET flobopuyo PROPERTY CXX_EXTENSIONS OFF)
target_compile_definitions(flobopuyo
PRIVATE USE_AUDIO
PRIVATE HAVE_OPENGL
PRIVATE DATADIR=\"${CMAKE_SOURCE_DIR}/data\"
)
if(APPLE)
target_compile_definitions(flobopuyo
PRIVATE GL_SILENCE_DEPRECATION
)
endif()
target_include_directories(flobopuyo
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
)
target_include_directories(flobopuyo
SYSTEM
PRIVATE ${SDL_INCLUDE_DIRS}
PRIVATE ${SDL_IMAGE_INCLUDE_DIRS}
PRIVATE ${SDL_MIXER_INCLUDE_DIRS}
)
target_link_libraries(flobopuyo
${OPENGL_LIBRARIES}
${SDL_LIBRARIES}
${SDL_IMAGE_LIBRARIES}
${SDL_MIXER_LIBRARIES}
)