forked from SasLuca/rayfork
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
23 lines (19 loc) · 954 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
cmake_minimum_required(VERSION 3.1)
project(rayfork LANGUAGES C CXX)
add_library(rayfork-dev)
target_sources(rayfork-dev PRIVATE "source/rayfork.c")
target_compile_features(rayfork-dev PUBLIC c_std_99)
target_include_directories(rayfork-dev PUBLIC "source" "source/core" "source/gfx" "source/audio" "source/internal" "source/math" "source/str" "source/libs" "source/audio" "source/csv" "source/arr")
#target_compile_definitions(rayfork-dev PUBLIC RAYFORK_GRAPHICS_BACKEND_DIRECTX)
if (RAYFORK_TEST_AMALGAMATED)
add_library(amalgamated)
target_compile_features(amalgamated PUBLIC c_std_99)
target_sources(amalgamated PRIVATE "amalgamated/rayfork.c")
target_include_directories(amalgamated PUBLIC "amalgamated")
set(rayfork_path "${CMAKE_CURRENT_SOURCE_DIR}/amalgamated")
set(rayfork amalgamated)
else()
set(rayfork_path "${CMAKE_CURRENT_SOURCE_DIR}/rayfork-dev")
set(rayfork rayfork-dev)
endif()
add_subdirectory(tests)