diff --git a/CMakeLists.txt b/CMakeLists.txt index 830f8fd9..77094616 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,15 +1,7 @@ -cmake_minimum_required(VERSION 3.4...3.28 FATAL_ERROR) +cmake_minimum_required(VERSION 3.16...3.28) project(GLFW VERSION 3.5.0 LANGUAGES C) -if (POLICY CMP0069) - cmake_policy(SET CMP0069 NEW) -endif() - -if (POLICY CMP0077) - cmake_policy(SET CMP0077 NEW) -endif() - set_property(GLOBAL PROPERTY USE_FOLDERS ON) string(COMPARE EQUAL "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_SOURCE_DIR}" GLFW_STANDALONE) @@ -80,24 +72,7 @@ endif() # This is here because it also applies to tests and examples #-------------------------------------------------------------------- if (MSVC AND NOT USE_MSVC_RUNTIME_LIBRARY_DLL) - if (CMAKE_VERSION VERSION_LESS 3.15) - foreach (flag CMAKE_C_FLAGS - CMAKE_C_FLAGS_DEBUG - CMAKE_C_FLAGS_RELEASE - CMAKE_C_FLAGS_MINSIZEREL - CMAKE_C_FLAGS_RELWITHDEBINFO) - - if (flag MATCHES "/MD") - string(REGEX REPLACE "/MD" "/MT" ${flag} "${${flag}}") - endif() - if (flag MATCHES "/MDd") - string(REGEX REPLACE "/MDd" "/MTd" ${flag} "${${flag}}") - endif() - - endforeach() - else() - set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>") - endif() + set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>") endif() #-------------------------------------------------------------------- diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 463b898d..d6c18fa5 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -137,13 +137,6 @@ target_include_directories(glfw PRIVATE "${GLFW_BINARY_DIR}/src") target_link_libraries(glfw PRIVATE Threads::Threads) -# Workaround for CMake not knowing about .m files before version 3.16 -if (CMAKE_VERSION VERSION_LESS "3.16" AND APPLE) - set_source_files_properties(cocoa_init.m cocoa_joystick.m cocoa_monitor.m - cocoa_window.m nsgl_context.m PROPERTIES - LANGUAGE C) -endif() - if (GLFW_BUILD_WIN32) list(APPEND glfw_PKG_LIBS "-lgdi32") endif()