diff options
| author | Ahmad Fatoum <[email protected]> | 2018-04-07 16:53:19 +0200 |
|---|---|---|
| committer | Ahmad Fatoum <[email protected]> | 2018-04-07 22:41:43 +0200 |
| commit | d88523f03abcf396a8a8198503285bc231828c81 (patch) | |
| tree | 1c8fb53fa78fe0f4af62695713344a4f5b92b85a /src/CMakeOptions.txt | |
| parent | 3caa044bf259653eadcba5dc413101b95c6ebfbb (diff) | |
| download | raylib-d88523f03abcf396a8a8198503285bc231828c81.tar.gz raylib-d88523f03abcf396a8a8198503285bc231828c81.zip | |
Split CMake options into separate CMakeOptions.txt
Diffstat (limited to 'src/CMakeOptions.txt')
| -rw-r--r-- | src/CMakeOptions.txt | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/CMakeOptions.txt b/src/CMakeOptions.txt new file mode 100644 index 00000000..ef530d8e --- /dev/null +++ b/src/CMakeOptions.txt @@ -0,0 +1,29 @@ +### Config options ### + +# 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(SHARED "Build raylib as a dynamic library" OFF) +option(STATIC "Build raylib as a static library" ON) +option(USE_AUDIO "Build raylib with audio module" ON) +option(MACOS_FATLIB "Build fat library for both i386 and x86_64 on macOS" ON) + +set(PLATFORM "Desktop" CACHE STRING "Platform to build for.") +set_property(CACHE PLATFORM PROPERTY STRINGS "Desktop" "Web" "Android" "Raspberry Pi") + +set(OPENGL_VERSION "3.3" CACHE STRING "OpenGL Version to build raylib with") +set_property(CACHE OPENGL_VERSION PROPERTY STRINGS "3.3" "2.1" "1.1" "ES 2.0") + +if(NOT (STATIC OR SHARED)) + message(FATAL_ERROR "Nothing to do if both -DSHARED=OFF and -DSTATIC=OFF...") +endif() + +if(DEFINED SHARED_RAYLIB) + set(SHARED ${SHARED_RAYLIB}) + message(DEPRECATION "-DSHARED_RAYLIB is deprecated. Please use -DSHARED instead.") +endif() +if(DEFINED STATIC_RAYLIB) + set(STATIC ${STATIC_RAYLIB}) + message(DEPRECATION "-DSTATIC_RAYLIB is deprecated. Please use -DSTATIC instead.") +endif() + +# vim: ft=cmake |
