-
-
Notifications
You must be signed in to change notification settings - Fork 30
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
74 lines (57 loc) · 1.62 KB
/
CMakeLists.txt
File metadata and controls
74 lines (57 loc) · 1.62 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
cmake_minimum_required (VERSION 3.17 FATAL_ERROR)
project (RendererEngine
VERSION 1.0
DESCRIPTION "Renderer Engine is an open-source 2D - 3D rendering engine written in C/C++"
LANGUAGES CXX C
)
set_property (GLOBAL PROPERTY USE_FOLDERS ON)
# Core invariants
#
include(Scripts/CMake/NuGet.cmake)
include(Scripts/CMake/CppWinRT.cmake)
option (COPY_EXAMPLE_PROJECT "Copy example projects that show how to use Launcher" ON)
option (LAUNCHER_ONLY "Build Launcher only" OFF)
set (MACOSX_ARCHITECTURE_ARM64 OFF)
if (APPLE)
# Use uname to detect the macOS processor architecture
execute_process(
COMMAND uname -m
OUTPUT_VARIABLE MACOSX_ARCHITECTURE
OUTPUT_STRIP_TRAILING_WHITESPACE
)
if (MACOSX_ARCHITECTURE STREQUAL "arm64")
set (MACOSX_ARCHITECTURE_ARM64 ON)
endif ()
endif ()
if(${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
add_compile_definitions(_SILENCE_STDEXT_ARR_ITERS_DEPRECATION_WARNING) # Fix Warning from VS 2022 +
endif()
list( APPEND CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib )
# Externals dependencies
#
if (NOT LAUNCHER_ONLY)
# Enable CMake's CTest Functionality
#
include(CTest)
# Setup Dependencies
#
include(dependencies.cmake)
# Compile Shaders
#
add_subdirectory (Resources)
# Core engine lib is here
#
add_subdirectory (ZEngine)
# Editor is here
#
add_subdirectory (Tetragrama)
# Entry point is here
#
add_subdirectory (Obelisk)
endif ()
# Launcher is here
#
add_subdirectory (Panzerfaust)
if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
set_property (DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT Panzerfaust)
endif ()