-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
45 lines (37 loc) · 1.17 KB
/
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
40
41
42
43
44
45
cmake_minimum_required(VERSION 3.11)
project(raylib-umka
DESCRIPTION "raylib-umka: Umka bindings for raylib."
HOMEPAGE_URL "https://github.com/robloach/raylib-umka"
VERSION 0.1.0
LANGUAGES C
)
# Register the cmake folder for find_package()
LIST(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
# raylib-umka-h
add_library(raylib-umka-h INTERFACE)
target_include_directories(raylib-umka-h INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/include)
# Options
if ("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}")
set(RAYLIB_UMKA_IS_MAIN TRUE)
else()
set(RAYLIB_UMKA_IS_MAIN FALSE)
endif()
option(RAYLIB_UMKA_BUILD_BIN "Binary" ${RAYLIB_UMKA_IS_MAIN})
# raylib-umka
if (RAYLIB_UMKA_BUILD_BIN)
add_subdirectory(bin)
# Testing
include(CTest)
enable_testing()
if (BUILD_TESTING)
# set(CTEST_CUSTOM_TESTS_IGNORE
# pkg-config--static
# )
# On failure, display the output.
list(APPEND CMAKE_CTEST_ARGUMENTS "--output-on-failure")
add_test(
NAME raylib-umka-tests
COMMAND raylib-umka ${CMAKE_CURRENT_SOURCE_DIR}/tests/raylib-umka-tests.um
)
endif()
endif()