mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
build: delegate rpath handling to CMake
This moves the rpath handling to the build system rather than trying to figure out the correct flags to pass to the driver.
This commit is contained in:
@@ -15,14 +15,10 @@ target_link_libraries(swift-syntax-parser-test
|
||||
libSwiftSyntaxParser
|
||||
)
|
||||
|
||||
if(APPLE)
|
||||
# Prioritize finding the parser library from the build/lib directory.
|
||||
# Otherwise it may find it from the 'lib/swift/macosx' directory which could
|
||||
# be out-of-date.
|
||||
get_target_property(link_flags swift-syntax-parser-test LINK_FLAGS)
|
||||
set(link_flags "-Xlinker -rpath -Xlinker @executable_path/../lib ${link_flags}")
|
||||
set_property(TARGET swift-syntax-parser-test PROPERTY
|
||||
LINK_FLAGS "${link_flags}")
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL Darwin)
|
||||
set_target_properties(swift-syntax-parser-test PROPERTIES
|
||||
BUILD_WITH_INSTALL_RPATH YES
|
||||
INSTALL_RPATH @executable_path/../lib)
|
||||
endif()
|
||||
|
||||
set_property(TARGET swift-syntax-parser-test APPEND_STRING PROPERTY
|
||||
|
||||
Reference in New Issue
Block a user