From e14434c059471310a6c8f640615e17e2e62f25fa Mon Sep 17 00:00:00 2001 From: t1c Date: Mon, 28 Apr 2025 13:36:29 +0800 Subject: [PATCH] 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()