-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
47 lines (40 loc) · 1.3 KB
/
CMakeLists.txt
File metadata and controls
47 lines (40 loc) · 1.3 KB
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
46
47
cmake_minimum_required(VERSION 3.11)
project (raylib-physfs
VERSION 6.0.0
DESCRIPTION "raylib-physfs"
HOMEPAGE_URL "https://github.com/robloach/raylib-physfs"
LANGUAGES C
)
# Options
if ("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}")
set(RAYLIB_PHYSFS_IS_MAIN TRUE)
else()
set(RAYLIB_PHYSFS_IS_MAIN FALSE)
endif()
option(RAYLIB_PHYSFS_BUILD_EXAMPLES "Examples" ${RAYLIB_PHYSFS_IS_MAIN})
option(RAYLIB_PHYSFS_PLATFORM_RAYLIB "Use raylib as the PhysFS platform layer instead of the default OS platform" OFF)
# Library
add_library(raylib_physfs INTERFACE)
# Include Directory
target_include_directories(raylib_physfs INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/)
# Propagate PHYSFS_PLATFORM_RAYLIB to all consumers of this library.
if (RAYLIB_PHYSFS_PLATFORM_RAYLIB)
target_compile_definitions(raylib_physfs INTERFACE PHYSFS_PLATFORM_RAYLIB)
endif()
# Install the header and the raylib platform implementation together.
install(FILES raylib-physfs.h physfs_platform_raylib.c
DESTINATION include
)
# examples
if (RAYLIB_PHYSFS_BUILD_EXAMPLES)
add_subdirectory(examples)
# Testing
include(CTest)
enable_testing()
if(BUILD_TESTING)
# set(CTEST_CUSTOM_TESTS_IGNORE
# pkg-config--static
# )
add_subdirectory(test)
endif()
endif()