-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
35 lines (27 loc) · 1.05 KB
/
CMakeLists.txt
File metadata and controls
35 lines (27 loc) · 1.05 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
cmake_minimum_required(VERSION 3.15)
project(wyre)
# C++ standard version
set(CMAKE_CXX_STANDARD 20 CACHE STRING "" FORCE)
# Library target
add_library(wyre STATIC)
target_compile_definitions(wyre PRIVATE WYRE_RUN=0)
set_target_properties(wyre PROPERTIES OUTPUT_NAME ${CMAKE_PROJECT_NAME})
# Add compiler (debug & release) definitions
target_compile_definitions(wyre PRIVATE $<$<CONFIG:Debug>:DEBUG=1>)
target_compile_definitions(wyre PRIVATE $<$<CONFIG:Release>:NDEBUG=1>)
# Include directories & pre-compiled header
target_include_directories(wyre PUBLIC "src/")
target_include_directories(wyre PRIVATE "src/wyre/platform/")
# target_precompile_headers(wyre PRIVATE "src/pch.h")
# Glob all source files
file(GLOB_RECURSE src "src/*.cpp")
target_sources(wyre PRIVATE ${src})
# External dependencies
add_subdirectory("extern")
# Don't add example projects if Wyre is used with "add_subdirectory"
if(${CMAKE_SOURCE_DIR} STREQUAL ${PROJECT_SOURCE_DIR})
# Example projects
add_subdirectory("examples")
endif()
# Engine assets directory
add_subdirectory("assets")