From 4fa31fce4e2d89dda1d0101a9a0f79614c5cf51d Mon Sep 17 00:00:00 2001 From: a dinosaur Date: Tue, 28 May 2024 19:59:24 +1000 Subject: [PATCH] Set RPATH property instead of adding a link option --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6ee6460..162cb1c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,6 +15,6 @@ target_compile_definitions(Lesson10 PRIVATE $<$:_CRT_SECUR if (CMAKE_SYSTEM_NAME STREQUAL "Darwin") get_property(SDL3_IMPORTED_LOCATION TARGET SDL3::SDL3 PROPERTY IMPORTED_LOCATION) if (SDL3_IMPORTED_LOCATION MATCHES "^/Library/Frameworks/") - target_link_options(Lesson10 PRIVATE -Wl,-rpath,/Library/Frameworks) + set_property(TARGET Lesson10 PROPERTY BUILD_RPATH "/Library/Frameworks") endif() endif()