-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathConfig.cmake
More file actions
38 lines (35 loc) · 1.5 KB
/
Config.cmake
File metadata and controls
38 lines (35 loc) · 1.5 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
# ==== Test config ====
option(PYRO_PLATFORM_BUILD_TESTS "Build tests" OFF)
option(PYRO_PLATFORM_DUMMY_INTERFACE "Disables implementations. Useful for CI/CD where it's pointless to build the implementation to see if the project builds." OFF)
option(PYRO_PLATFORM_SHARED_LIBRARY "Build Platform as shared library" OFF)
option(PYRO_PLATFORM_FILE "Include filesystem capabilities (including loading dlls and such)" ON)
option(PYRO_PLATFORM_TIME "Include time fuctionalities" ON)
option(PYRO_PLATFORM_WINDOWING "Include windowing systems" ON)
if (PYRO_PLATFORM_WINDOWING)
# ==== Windowing Backends ====
set(PYRO_PLATFORM_WINDOWING_SYSTEM "GLFW" CACHE STRING "Windowing system")
set_property(CACHE PYRO_PLATFORM_WINDOWING_SYSTEM PROPERTY STRINGS "GLFW")
message(STATUS "Selected windowing system: ${PYRO_WINDOWING_SYSTEM}")
if (PYRO_PLATFORM_DUMMY_INTERFACE)
add_definitions(-DPYRO_PLATFORM_DUMMY_INTERFACE=1)
message(STATUS "PYRO_PLATFORM_DUMMY_INTERFACE is ON, disabling any implementations.")
else()
# Set macros accordingly
if(PYRO_PLATFORM_WINDOWING_SYSTEM STREQUAL "GLFW")
add_definitions(-DPYRO_PLATFORM_WINDOWING_GLFW=1)
set(PYRO_PLATFORM_WINDOWING_GLFW 1)
set(PYRO_PLATFORM_WINDOWING_DIRNAME "Glfw")
else()
message(FATAL_ERROR "Unsupported windowing system: ${PYRO_WINDOWING_SYSTEM}")
endif()
endif()
endif()
if (APPLE)
set(PYRO_PLATFORM_DIRNAME "Macos")
endif()
if (UNIX AND NOT APPLE)
set(PYRO_PLATFORM_DIRNAME "Linux")
endif()
if (WIN32)
set(PYRO_PLATFORM_DIRNAME "Windows")
endif()