-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
37 lines (32 loc) · 904 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
cmake_minimum_required(VERSION 3.11)
project(raylib-duktape
DESCRIPTION "raylib-duktape: raylib for Duktape JavaScript"
HOMEPAGE_URL "https://github.com/robloach/raylib-duktape"
VERSION 0.0.1
)
add_definitions(
-Wfatal-errors
)
# Options
if ("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}")
set(RAYLIB_DUKTAPE_IS_MAIN TRUE)
else()
set(RAYLIB_DUKTAPE_IS_MAIN FALSE)
endif()
option(RAYLIB_DUKTAPE_BUILD_EXAMPLES "Examples" ${RAYLIB_DUKTAPE_IS_MAIN})
option(RAYLIB_DUKTAPE_BUILD_BINARY "Binary" ${RAYLIB_DUKTAPE_IS_MAIN})
option(RAYLIB_DUKTAPE_BUILD_TESTS "Tests" ${RAYLIB_DUKTAPE_IS_MAIN})
add_subdirectory(lib)
if (RAYLIB_DUKTAPE_BUILD_BINARY)
add_subdirectory(bin)
endif()
if (RAYLIB_DUKTAPE_BUILD_EXAMPLES)
add_subdirectory(examples)
endif()
if (RAYLIB_DUKTAPE_BUILD_TESTS)
include(CTest)
enable_testing()
if (BUILD_TESTING)
add_subdirectory(tests)
endif()
endif()