diff options
| author | Ahmad Fatoum <[email protected]> | 2018-04-07 22:51:03 +0200 |
|---|---|---|
| committer | Ahmad Fatoum <[email protected]> | 2018-04-07 23:39:53 +0200 |
| commit | 1dbce352479f64748879fecb9df646654cd92229 (patch) | |
| tree | 451901d0b4e5706b63d5a15ccd503ef3b975048c /utils.cmake | |
| parent | 1841afad11892bab16976b976d69b7757b617c8b (diff) | |
| download | raylib-1dbce352479f64748879fecb9df646654cd92229.tar.gz raylib-1dbce352479f64748879fecb9df646654cd92229.zip | |
CMake: Generate config.h from CMakeOptions.txt
I would have liked config.h to be selected by include dir configuration,
but this way is less intrusive.
Diffstat (limited to 'utils.cmake')
| -rw-r--r-- | utils.cmake | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/utils.cmake b/utils.cmake index fc9ea8f6..71e34e01 100644 --- a/utils.cmake +++ b/utils.cmake @@ -1,12 +1,7 @@ # All sorts of things that we need cross project cmake_minimum_required(VERSION 2.8.0) -set(USE_EXTERNAL_GLFW OFF CACHE STRING "Link raylib against system GLFW instead of embedded one") -set_property(CACHE USE_EXTERNAL_GLFW PROPERTY STRINGS ON OFF IF_POSSIBLE) - -if(UNIX AND NOT APPLE) - option(USE_WAYLAND "Use Wayland for window creation" OFF) -endif() +add_definitions("-DRAYLIB_CMAKE=1") # Linking for OS X -framework options # Will do nothing on other OSes @@ -29,7 +24,7 @@ else() endif() find_library(pthread NAMES pthread) - find_package(OpenGL) + find_package(OpenGL QUIET) if ("${OPENGL_LIBRARIES}" STREQUAL "") if(NOT USE_WAYLAND) # CFLAGS=-m32 cmake on Linux fails for some reason, so fallback to hardcoding @@ -69,7 +64,7 @@ endif() if(USE_EXTERNAL_GLFW STREQUAL "ON") find_package(glfw3 3.2.1 REQUIRED) elseif(USE_EXTERNAL_GLFW STREQUAL "IF_POSSIBLE") - find_package(glfw3 3.2.1) + find_package(glfw3 3.2.1 QUIET) endif() if (glfw3_FOUND) set(LIBS_PRIVATE ${LIBS_PRIVATE} glfw) @@ -114,4 +109,3 @@ function(link_libraries_to_executable executable) target_link_libraries(${executable} raylib ${__PKG_CONFIG_LIBS_PRIVATE}) endif() endfunction() - |
