-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
81 lines (72 loc) · 1.57 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
cmake_minimum_required(VERSION 3.15 FATAL_ERROR)
project(sketchthis VERSION 0.1.0 LANGUAGES CXX)
include(CMakePackageConfigHelpers)
include(FindPkgConfig)
include(FindPkgConfig)
include(GNUInstallDirs)
find_package(Boost 1.65 REQUIRED)
pkg_check_modules(SDL2 sdl2>=2.0.10 REQUIRED)
pkg_check_modules(SDL2_TTF SDL2_ttf>=2.0 REQUIRED)
add_executable(sketchthis
src/application.cpp
src/application.hpp
src/button.cpp
src/button.hpp
src/font.cpp
src/font.hpp
src/fps_ctl.cpp
src/fps_ctl.hpp
src/menu_reactor.cpp
src/menu_reactor.hpp
src/reactor.cpp
src/reactor.hpp
src/renderer.cpp
src/renderer.hpp
src/sdl2.cpp
src/sdl2.hpp
src/sdl2_ttf.cpp
src/sdl2_ttf.hpp
src/sketchthis.cpp
src/surface.cpp
src/surface.hpp
src/term.hpp
src/texture.cpp
src/texture.hpp
src/tlsm.hpp
src/tlsm_events.hpp
src/window.cpp
src/window.hpp)
set_source_files_properties(
src/font.cpp
src/menu_reactor.cpp
PROPERTIES
COMPILE_OPTIONS
-fexceptions)
target_compile_features(sketchthis
PRIVATE
cxx_std_17)
target_compile_options(sketchthis
PRIVATE
-Wall
-Werror
-Wextra
-pedantic
-Wconversion
-Winit-self
-Woverloaded-virtual
-Wunreachable-code
-Wold-style-cast
-Wsign-promo
-Wshadow
-fno-exceptions)
target_include_directories(sketchthis
PRIVATE
${SDL2_INCLUDE_DIRS}
${SDL2_TTF_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS})
target_link_libraries(sketchthis
PRIVATE
stdc++fs
${SDL2_LIBRARIES}
${SDL2_TTF_LIBRARIES}
${Boost_LIBRARIES})