build: osx: set RPATH to executable path

This commit is contained in:
fgsfds committed 2024-11-21 19:31:14 +01:00
1 parent bc1f1c26db
commit 4bc1a16d36
2 files changed
+12 -6

No files matched your search

+6
View File
@@ -186,6 +186,12 @@ add_compile_options($<$<COMPILE_LANGUAGE:C>:-Wno-pointer-sign>)
# C++ specific flags
add_compile_options($<$<COMPILE_LANGUAGE:CXX>:-Wno-unused-function>)
# Platform-specific flags
if (APPLE)
# Make it look for libs in the executable folder manually since CMake's rpath system is wack
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -rpath @executable_path")
endif()
# Dependencies
set(LIBS )