File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -159,6 +159,22 @@ if(CMAKE_SYSTEM_NAME STREQUAL Windows)
159
159
$< TARGET_OBJECTS:CoreFoundationResources> )
160
160
elseif (NOT CMAKE_SYSTEM_NAME STREQUAL Darwin )
161
161
target_link_options (Foundation PRIVATE "SHELL:-no-toolchain-stdlib-rpath" )
162
+
163
+ execute_process (
164
+ COMMAND ${CMAKE_Swift_COMPILER} -print-target-info
165
+ OUTPUT_VARIABLE output
166
+ ERROR_VARIABLE error_output
167
+ RESULT_VARIABLE result
168
+ )
169
+ if (NOT ${result} EQUAL 0 )
170
+ message (FATAL_ERROR "Error getting target info with\n "
171
+ " `${CMAKE_Swift_COMPILER} -print-target-info`\n "
172
+ "Error:\n "
173
+ " ${error_output} " )
174
+ endif ()
175
+
176
+ string (REGEX MATCH "\" runtimeLibraryPaths\" : \\ [\n\ +\" ([^\" ]+)\" " path ${output} )
177
+ set_target_properties (Foundation PROPERTIES BUILD_RPATH ${CMAKE_MATCH_1} )
162
178
endif ()
163
179
164
180
You can’t perform that action at this time.
0 commit comments