-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
29 lines (23 loc) · 1017 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
cmake_minimum_required(VERSION 3.22)
project(ExampleVortex)
add_executable(ExampleVortex
"example/src/main.c"
)
target_link_libraries(ExampleVortex PRIVATE vortex)
target_include_directories(ExampleVortex PRIVATE
"engine/src"
"engine/extern/SDL2/include"
) # TODO: Remove all of these includes by removing them from public API
add_subdirectory("engine")
file(COPY "example/assets" DESTINATION "${CMAKE_BINARY_DIR}")
if (UNIX)
target_compile_options(vortex PUBLIC "-fsanitize=undefined")
target_compile_options(ExampleVortex PUBLIC "-fsanitize=undefined")
target_link_options(ExampleVortex PUBLIC "-fsanitize=undefined")
elseif (MSVC)
set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT ExampleVortex)
# TODO: Get sanitization working on MSVC
# This causes breakpoints in from code outside of vortex and VortexExample
#add_compile_options("/fsanitize=address")
#target_compile_options(vortex PUBLIC "/fsanitize=address")
endif (UNIX)