-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
28 lines (18 loc) · 786 Bytes
/
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
cmake_minimum_required(VERSION 3.20)
project(castle_defense_game)
file(GLOB_RECURSE SOURCE_FILES ${CMAKE_SOURCE_DIR}/src/*.c)
file(GLOB_RECURSE HEADER_FILES ${CMAKE_SOURCE_DIR}/include/*.h)
link_directories(${CMAKE_SOURCE_DIR}/lib)
find_package(OpenGL REQUIRED)
add_compile_definitions("_SOURCE_ROOT=${CMAKE_SOURCE_DIR}")
add_executable(castle_defense_game ${HEADER_FILES} ${SOURCE_FILES})
set_property(TARGET castle_defense_game PROPERTY C_STANDARD 99)
target_compile_options(
castle_defense_game PRIVATE
/W3 /nologo /EHsc
"$<$<CONFIG:Debug>:/Oy-;/Ob0;/Zi;/DDEBUG;/D_DEBUG>"
)
target_include_directories(castle_defense_game PRIVATE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
)
target_link_libraries(castle_defense_game glfw3 freetype OpenGL::GL)