307c998495
* Create ParseConfigHeader.cmake This script parses the config.h file to automate the process of exposing the configuration flags and configuration values found in the latter. * Update CompileDefinitions.cmake Makes use of the new functionality found in ParseConfigHeader.cmake to make things consistent. * Update CMakeOptions.txt Makes use of the new functionality found in ParseConfigHeader.cmake to make things consistent. * Update CMakeLists.txt Changes required to make possible building raylib for web on Windows 10. * Update LibraryConfigurations.cmake Removes a warning that linker-only flags were being passed to the compiler, which is in accordance to https://emscripten.org/docs/tools_reference/settings_reference.html. * Update CMakeOptions.txt Removed clutter. * Update CompileDefinitions.cmake Removed clutter. * Update CompileDefinitions.cmake Some applications might check for PLATFORM_WEB instead of __EMSCRIPTEN__. * Update CompileDefinitions.cmake Reverting * Update CMakeLists.txt USE_AUDIO is redundant in the presence of the already existent and more descriptive SUPPORT_MODULE_RAUDIO. * Update CompileDefinitions.cmake USE_AUDIO is redundant in the presence of the already existent and more descriptive SUPPORT_MODULE_RAUDIO. * Update ParseConfigHeader.cmake * Revert "Update CMakeLists.txt" This reverts commit1785fc06b5
. * Revert "Update CompileDefinitions.cmake" This reverts commit62f9a3a0ea
. * Revert "Update CMakeLists.txt" This reverts commit3e7912144e
. * Revert "Update LibraryConfigurations.cmake" This reverts commitbcc4310c49
.
37 lines
1.8 KiB
Plaintext
37 lines
1.8 KiB
Plaintext
# ## Config options ###
|
|
include(CMakeDependentOption)
|
|
include(EnumOption)
|
|
|
|
enum_option(PLATFORM "Desktop;Web;Android;Raspberry Pi;DRM;SDL" "Platform to build for.")
|
|
|
|
enum_option(OPENGL_VERSION "OFF;4.3;3.3;2.1;1.1;ES 2.0;ES 3.0" "Force a specific OpenGL Version?")
|
|
|
|
# Configuration options
|
|
option(BUILD_EXAMPLES "Build the examples." ${RAYLIB_IS_MAIN})
|
|
option(CUSTOMIZE_BUILD "Show options for customizing your Raylib library build." OFF)
|
|
option(ENABLE_ASAN "Enable AddressSanitizer (ASAN) for debugging (degrades performance)" OFF)
|
|
option(ENABLE_UBSAN "Enable UndefinedBehaviorSanitizer (UBSan) for debugging" OFF)
|
|
option(ENABLE_MSAN "Enable MemorySanitizer (MSan) for debugging (not recommended to run with ASAN)" OFF)
|
|
|
|
# Shared library is always PIC. Static library should be PIC too if linked into a shared library
|
|
option(WITH_PIC "Compile static library as position-independent code" OFF)
|
|
option(BUILD_SHARED_LIBS "Build raylib as a shared library" OFF)
|
|
option(MACOS_FATLIB "Build fat library for both i386 and x86_64 on macOS" OFF)
|
|
cmake_dependent_option(USE_AUDIO "Build raylib with audio module" ON CUSTOMIZE_BUILD ON)
|
|
|
|
enum_option(USE_EXTERNAL_GLFW "OFF;IF_POSSIBLE;ON" "Link raylib against system GLFW instead of embedded one")
|
|
|
|
# GLFW build options
|
|
option(GLFW_BUILD_WAYLAND "Build the bundled GLFW with Wayland support" ON)
|
|
option(GLFW_BUILD_X11 "Build the bundled GLFW with X11 support" ON)
|
|
|
|
option(INCLUDE_EVERYTHING "Include everything disabled by default (for CI usage" OFF)
|
|
set(OFF ${INCLUDE_EVERYTHING} CACHE INTERNAL "Replace any OFF by default with \${OFF} to have it covered by this option")
|
|
|
|
include(ParseConfigHeader)
|
|
|
|
foreach(FLAG IN LISTS CONFIG_HEADER_FLAGS)
|
|
string(REGEX MATCH "([^=]+)=(.+)" _ ${FLAG})
|
|
cmake_dependent_option(${CMAKE_MATCH_1} "" ${CMAKE_MATCH_2} CUSTOMIZE_BUILD ${CMAKE_MATCH_2})
|
|
endforeach()
|