-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
39 lines (29 loc) · 905 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
cmake_minimum_required(VERSION 3.17)
project(Dali VERSION 0.1.0)
option(DALI_SKIP_EXECUTABLE "Skip building executable" OFF)
if (MSVC)
# warning level 4 and all warnings as errors
add_compile_options(/W4 /WX)
else()
# lots of warnings and all warnings as errors
add_compile_options(-Wall -Wno-missing-braces)
endif()
if(NOT DEFINED OBSIDIAN_URL)
set(OBSIDIAN_URL https://github.com/mokchira/obsidian)
endif()
if(WIN32)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
endif()
include(FetchContent)
FetchContent_Declare(
obsidian
GIT_REPOSITORY ${OBSIDIAN_URL}
GIT_TAG master)
FetchContent_MakeAvailable(obsidian)
# So we can use the author_shaders cmake function
list(APPEND CMAKE_MODULE_PATH ${obsidian_SOURCE_DIR}/cmake)
add_subdirectory(src/lib)
add_subdirectory(src/shaders)
if(NOT ${DALI_SKIP_EXECUTABLE})
add_subdirectory(src/bin)
endif()