From dc971798e898c06f3e9de0a93f00442e70371f3c Mon Sep 17 00:00:00 2001 From: t1c Date: Fri, 25 Apr 2025 16:31:14 +0800 Subject: [PATCH 1/4] Update CMakeLists.txt According to the CMake official documentation (as of version 3.28), the valid options for the configure_file command are limited to: @ONLY, ESCAPE_QUOTES, COPYONLY, and NEWLINE_STYLE, while IMMEDIATE is not recognized as a standard option. https://cmake.org/cmake/help/v3.28/command/configure_file.html#configure-file --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 398b36eb..85de0fed 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -129,7 +129,7 @@ if (GLFW_INSTALL) # Only generate this target if no higher-level project already has if (NOT TARGET uninstall) configure_file(CMake/cmake_uninstall.cmake.in - cmake_uninstall.cmake IMMEDIATE @ONLY) + cmake_uninstall.cmake @ONLY) add_custom_target(uninstall "${CMAKE_COMMAND}" -P From 5d38860335862741544990df638ae38b3593318b Mon Sep 17 00:00:00 2001 From: t1c Date: Sun, 27 Apr 2025 20:27:46 +0800 Subject: [PATCH 2/4] Update CMakeLists.txt https://cmake.org/cmake/help/v3.28/variable/CMAKE_DL_LIBS.html#cmake-dl-libs https://cmake.org/cmake/help/v3.28/command/find_library.html#find-library --- src/CMakeLists.txt | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 1a085b2b..aacdb296 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -216,21 +216,23 @@ endif() if (UNIX AND NOT APPLE) find_library(RT_LIBRARY rt) mark_as_advanced(RT_LIBRARY) - if (RT_LIBRARY) + if (NOT RT_LIBRARY STREQUAL "RT_LIBRARY-NOTFOUND") target_link_libraries(glfw PRIVATE "${RT_LIBRARY}") list(APPEND glfw_PKG_LIBS "-lrt") endif() find_library(MATH_LIBRARY m) mark_as_advanced(MATH_LIBRARY) - if (MATH_LIBRARY) + if (NOT MATH_LIBRARY STREQUAL "MATH_LIBRARY-NOTFOUND") target_link_libraries(glfw PRIVATE "${MATH_LIBRARY}") list(APPEND glfw_PKG_LIBS "-lm") endif() - if (CMAKE_DL_LIBS) - target_link_libraries(glfw PRIVATE "${CMAKE_DL_LIBS}") - list(APPEND glfw_PKG_LIBS "-l${CMAKE_DL_LIBS}") + find_library(DL_LIBRARY dl) + mark_as_advanced(DL_LIBRARY) + if (NOT DL_LIBRARY STREQUAL "DL_LIBRARY-NOTFOUND") + target_link_libraries(glfw PRIVATE "${DL_LIBRARY}") + list(APPEND glfw_PKG_LIBS "-ldl") endif() endif() From e14434c059471310a6c8f640615e17e2e62f25fa Mon Sep 17 00:00:00 2001 From: t1c Date: Mon, 28 Apr 2025 13:36:29 +0800 Subject: [PATCH 3/4] Update CMakeLists.txt https://cmake.org/cmake/help/v3.28/command/find_library.html#find-library --- examples/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index e7a03797..aca787d5 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -3,7 +3,7 @@ link_libraries(glfw) include_directories("${GLFW_SOURCE_DIR}/deps") -if (MATH_LIBRARY) +if (NOT MATH_LIBRARY STREQUAL "MATH_LIBRARY-NOTFOUND") link_libraries("${MATH_LIBRARY}") endif() @@ -38,7 +38,7 @@ add_executable(wave WIN32 MACOSX_BUNDLE wave.c ${ICON} ${GLAD_GL}) add_executable(windows WIN32 MACOSX_BUNDLE windows.c ${ICON} ${GLAD_GL}) target_link_libraries(particles Threads::Threads) -if (RT_LIBRARY) +if (NOT RT_LIBRARY STREQUAL "RT_LIBRARY-NOTFOUND") target_link_libraries(particles "${RT_LIBRARY}") endif() From dc77205ff284f5636b65fc5e44f650f6fd4e8380 Mon Sep 17 00:00:00 2001 From: t1c Date: Mon, 28 Apr 2025 13:44:34 +0800 Subject: [PATCH 4/4] Update CMakeLists.txt https://cmake.org/cmake/help/v3.28/command/find_library.html#find-library --- tests/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index f81cfeb9..99d02874 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -3,7 +3,7 @@ link_libraries(glfw) include_directories("${GLFW_SOURCE_DIR}/deps") -if (MATH_LIBRARY) +if (NOT MATH_LIBRARY STREQUAL "MATH_LIBRARY-NOTFOUND") link_libraries("${MATH_LIBRARY}") endif() @@ -43,7 +43,7 @@ add_executable(window WIN32 MACOSX_BUNDLE window.c ${GLAD_GL}) target_link_libraries(empty Threads::Threads) target_link_libraries(threads Threads::Threads) -if (RT_LIBRARY) +if (NOT RT_LIBRARY STREQUAL "RT_LIBRARY-NOTFOUND") target_link_libraries(empty "${RT_LIBRARY}") target_link_libraries(threads "${RT_LIBRARY}") endif()