Skip to content

Commit 6b2c8cf

Browse files
authored
Merge pull request #1789 from spevans/pr_fix_plutil
2 parents 409a9e9 + d5b9922 commit 6b2c8cf

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

CMakeLists.txt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ include(SwiftSupport)
2525
include(GNUInstallDirs)
2626
include(ExternalProject)
2727

28+
string(TOLOWER ${CMAKE_SYSTEM_NAME} swift_os)
29+
get_swift_host_arch(swift_arch)
30+
2831
ExternalProject_Add(CoreFoundation
2932
SOURCE_DIR
3033
${CMAKE_CURRENT_SOURCE_DIR}/CoreFoundation
@@ -286,6 +289,7 @@ add_swift_executable(plutil
286289
${libdispatch_ldflags}
287290
-lFoundation
288291
${Foundation_INTERFACE_LIBRARIES}
292+
-Xlinker;-rpath;-Xlinker;"\\\$\$ORIGIN/../lib/swift/${swift_os}"
289293
SWIFT_FLAGS
290294
-DDEPLOYMENT_RUNTIME_SWIFT
291295
${deployment_enable_libdispatch}
@@ -477,9 +481,6 @@ if(ENABLE_TESTING)
477481
${CMAKE_CURRENT_BINARY_DIR}/TestFoundation/xdgTestHelper${CMAKE_EXECUTABLE_SUFFIX})
478482
endif()
479483

480-
string(TOLOWER ${CMAKE_SYSTEM_NAME} swift_os)
481-
get_swift_host_arch(swift_arch)
482-
483484
# TODO(compnerd) honour lib vs lib64
484485
install(FILES
485486
${CMAKE_CURRENT_BINARY_DIR}/swift/Foundation.swiftdoc
@@ -507,7 +508,7 @@ install(FILES
507508
CoreFoundation/Base.subproj/module.map
508509
DESTINATION
509510
lib/swift/CoreFoundation)
510-
install(FILES
511+
install(PROGRAMS
511512
${CMAKE_CURRENT_BINARY_DIR}/plutil
512513
DESTINATION
513514
${CMAKE_INSTALL_FULL_BINDIR})

0 commit comments

Comments
 (0)