Add USE_RPATH option

This commit is contained in:
Jonas Kvinge
2022-09-30 01:00:29 +02:00
parent 6467c3c8ee
commit bab687bedf

View File

@@ -84,9 +84,9 @@ if(CMAKE_BUILD_TYPE MATCHES "Release")
add_definitions(-DQT_NO_DEBUG_OUTPUT) add_definitions(-DQT_NO_DEBUG_OUTPUT)
endif() endif()
if(APPLE) option(USE_RPATH "Use RPATH" APPLE)
set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE) if(USE_RPATH)
set(CMAKE_INSTALL_RPATH "@loader_path/../Frameworks") set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
endif() endif()
find_program(CCACHE_EXECUTABLE NAMES ccache) find_program(CCACHE_EXECUTABLE NAMES ccache)