-
Notifications
You must be signed in to change notification settings - Fork 21
/
CMakeLists.txt
41 lines (33 loc) · 891 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
29
30
31
32
33
34
35
36
37
38
39
40
41
cmake_minimum_required(VERSION 3.21)
project(
EDBR
VERSION 0.1.0
LANGUAGES CXX C
)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
include(ColorDiagnostics)
include(TargetAddExtraWarnings)
include(TargetShaders)
include(CopyDepsToRuntimeDir)
include(ExeTargetCommon)
include(AssetManagement)
include(EDBRShaders)
if (WIN32)
set(BUILD_SHARED_LIBS OFF CACHE BOOL "Link to libs dynamically")
else()
set(BUILD_SHARED_LIBS ON CACHE BOOL "Link to libs dynamically")
endif()
if (MSVC)
# Disable Just My Code debugging
add_compile_options(/JMC-)
endif()
# Check that git submodules were cloned
if(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/edbr/third_party/SDL/CMakeLists.txt")
include(FetchSubmodules)
fetch_submodules()
endif()
option(EDBR_BUILD_TESTING "Build tests" OFF)
add_subdirectory(edbr)
if (PROJECT_IS_TOP_LEVEL)
add_subdirectory(games)
endif()