-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
55 lines (41 loc) · 1.11 KB
/
CMakeLists.txt
File metadata and controls
55 lines (41 loc) · 1.11 KB
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.20)
project(gamecoe LANGUAGES C CXX)
set(CMAKE_CXX_STANDARD 23)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
set(GAMECOE_SOURCE_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR})
include(cmake/gamecoe_config.cmake)
check_compiler_version()
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Debug)
endif()
add_subdirectory(external)
include(FetchContent)
# Fetching gamecoe toolkit libraries:
fetch_logcoe()
fetch_testcoe()
fetch_soundcoe()
# Fetching external libraries for gamecoe:
fetch_glfw()
generate_glad()
fetch_glm()
# Generate gamecoe_config.hpp
generate_gamecoe_config_header()
message(STATUS "[gamecoe] Building gamecoe library...")
add_subdirectory(include)
add_subdirectory(src)
if(GAMECOE_USE_TESTCOE)
add_subdirectory(tests)
endif()
# gamecoe tester executable
# add_executable(tester main.cpp)
# target_link_libraries(tester
# PRIVATE
# gamecoe
# )
# copy_gamecoe_assets_to_build_root(tester)
# if(MSVC)
# target_compile_options(tester PRIVATE /W4 /WX)
# else()
# target_compile_options(tester PRIVATE -Werror -Wall -Wextra -Wpedantic)
# endif()