summaryrefslogtreecommitdiffhomepage
path: root/src/external/glfw/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'src/external/glfw/CMakeLists.txt')
-rw-r--r--src/external/glfw/CMakeLists.txt32
1 files changed, 9 insertions, 23 deletions
diff --git a/src/external/glfw/CMakeLists.txt b/src/external/glfw/CMakeLists.txt
index f5e538bf..a3cb1fe6 100644
--- a/src/external/glfw/CMakeLists.txt
+++ b/src/external/glfw/CMakeLists.txt
@@ -1,13 +1,7 @@
-cmake_minimum_required(VERSION 3.4...3.20 FATAL_ERROR)
+cmake_minimum_required(VERSION 3.4...3.28 FATAL_ERROR)
project(GLFW VERSION 3.4.0 LANGUAGES C)
-set(CMAKE_LEGACY_CYGWIN_WIN32 OFF)
-
-if (POLICY CMP0054)
- cmake_policy(SET CMP0054 NEW)
-endif()
-
if (POLICY CMP0069)
cmake_policy(SET CMP0069 NEW)
endif()
@@ -18,9 +12,7 @@ endif()
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
-if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
- set(GLFW_STANDALONE TRUE)
-endif()
+string(COMPARE EQUAL "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_SOURCE_DIR}" GLFW_STANDALONE)
option(BUILD_SHARED_LIBS "Build shared libraries" OFF)
option(GLFW_BUILD_EXAMPLES "Build the GLFW example programs" ${GLFW_STANDALONE})
@@ -35,11 +27,15 @@ if (GLFW_USE_OSMESA)
message(FATAL_ERROR "GLFW_USE_OSMESA has been removed; set the GLFW_PLATFORM init hint")
endif()
+if (DEFINED GLFW_USE_WAYLAND AND UNIX AND NOT APPLE)
+ message(FATAL_ERROR
+ "GLFW_USE_WAYLAND has been removed; delete the CMake cache and set GLFW_BUILD_WAYLAND and GLFW_BUILD_X11 instead")
+endif()
+
cmake_dependent_option(GLFW_BUILD_WIN32 "Build support for Win32" ON "WIN32" OFF)
cmake_dependent_option(GLFW_BUILD_COCOA "Build support for Cocoa" ON "APPLE" OFF)
cmake_dependent_option(GLFW_BUILD_X11 "Build support for X11" ON "UNIX;NOT APPLE" OFF)
-cmake_dependent_option(GLFW_BUILD_WAYLAND "Build support for Wayland"
- "${GLFW_USE_WAYLAND}" "UNIX;NOT APPLE" OFF)
+cmake_dependent_option(GLFW_BUILD_WAYLAND "Build support for Wayland" ON "UNIX;NOT APPLE" OFF)
cmake_dependent_option(GLFW_USE_HYBRID_HPG "Force use of high-performance GPU on hybrid systems" OFF
"WIN32" OFF)
@@ -63,11 +59,6 @@ list(APPEND CMAKE_MODULE_PATH "${GLFW_SOURCE_DIR}/CMake/modules")
find_package(Threads REQUIRED)
-if (GLFW_BUILD_DOCS)
- set(DOXYGEN_SKIP_DOT TRUE)
- find_package(Doxygen)
-endif()
-
#--------------------------------------------------------------------
# Report backend selection
#--------------------------------------------------------------------
@@ -138,7 +129,7 @@ if (GLFW_BUILD_TESTS)
add_subdirectory(tests)
endif()
-if (DOXYGEN_FOUND AND GLFW_BUILD_DOCS)
+if (GLFW_BUILD_DOCS)
add_subdirectory(docs)
endif()
@@ -160,11 +151,6 @@ if (GLFW_INSTALL)
install(FILES "${GLFW_BINARY_DIR}/src/glfw3.pc"
DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
- if (DOXYGEN_FOUND AND GLFW_BUILD_DOCS)
- install(DIRECTORY "${GLFW_BINARY_DIR}/docs/html"
- DESTINATION "${CMAKE_INSTALL_DOCDIR}")
- endif()
-
# Only generate this target if no higher-level project already has
if (NOT TARGET uninstall)
configure_file(CMake/cmake_uninstall.cmake.in