Swift: support -rpath for executables

This adjusts the flags to enable setting the RPATH for executables.
This commit is contained in:
Saleem Abdulrasool
2020-02-15 11:17:58 -08:00
committed by Brad King
parent 125f0451a9
commit 321df5783d

View File

@@ -29,6 +29,11 @@ endif()
if(NOT CMAKE_SYSTEM_NAME STREQUAL Windows)
set(CMAKE_SHARED_LIBRARY_RUNTIME_Swift_FLAG "-Xlinker -rpath -Xlinker ")
set(CMAKE_SHARED_LIBRARY_RUNTIME_Swift_FLAG_SEP ":")
if(NOT CMAKE_SYSTEM_NAME STREQUAL Darwin)
set(CMAKE_EXECUTABLE_RUNTIME_Swift_FLAG "-Xlinker -rpath -Xlinker ")
set(CMAKE_EXECUTABLE_RUNTIME_Swift_FLAG_SEP ":")
endif()
endif()
set(CMAKE_Swift_COMPILE_OPTIONS_TARGET "-target ")