From 8d1d278e7beeff9efd61b426e7a4af2bd265fc21 Mon Sep 17 00:00:00 2001 From: Kae <80987908+Novaenia@users.noreply.github.com> Date: Sun, 17 Mar 2024 15:32:05 +1100 Subject: [PATCH] Update CMakeLists.txt --- source/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt index a99cc7a..8df566f 100644 --- a/source/CMakeLists.txt +++ b/source/CMakeLists.txt @@ -275,6 +275,8 @@ if(STAR_COMPILER_GNU) set(CMAKE_C_FLAGS_RELEASE "-DNDEBUG -Ofast") set(CMAKE_CXX_FLAGS_RELEASE "-DNDEBUG -Ofast") + set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -rpath,$ORIGIN") + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -rpath,$ORIGIN") set(CMAKE_SKIP_BUILD_RPATH TRUE) elseif(STAR_COMPILER_CLANG)