-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
47 lines (38 loc) · 1.24 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
cmake_minimum_required(VERSION 3.20)
project(SkillCheckSimulator CXX)
# Setting parameters for raylib
set(CUSTOMIZE_BUILD ON)
set(BUILD_EXAMPLES OFF CACHE BOOL "" FORCE) # don't build the supplied examples
set(BUILD_GAMES OFF CACHE BOOL "" FORCE) # or games
if (NOT EMSCRIPTEN)
set(OPENGL_VERSION "1.1" CACHE STRING "" FORCE)
else ()
set(PLATFORM "Web" CACHE STRING "" FORCE)
endif ()
add_subdirectory(libs/raylib)
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
add_compile_options(-Wall -Wextra -pedantic -Wno-missing-field-initializers -Wdouble-promotion)
endif ()
if (EMSCRIPTEN)
add_link_options(-sUSE_GLFW=3 --preload-file "${CMAKE_CURRENT_LIST_DIR}/assets@assets")
set(CMAKE_EXECUTABLE_SUFFIX ".html")
endif ()
add_executable(SkillCheckSimulator
src/skillcheck.cpp
src/skillcheck.h
src/skillcheck_behavior.cpp
src/skillcheck_behavior.h
src/gamestates.cpp
src/gamestates.h
src/main.cpp
src/globals.h
src/achievements.cpp
src/achievements.h
src/help.cpp
src/help.h
src/settings.cpp
src/settings.h
)
target_compile_features(SkillCheckSimulator PRIVATE cxx_std_11)
target_include_directories(SkillCheckSimulator PRIVATE libs/raygui/src)
target_link_libraries(SkillCheckSimulator PRIVATE raylib)