File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -71,10 +71,16 @@ function(add_swift_host_library name)
7171 )
7272
7373 get_target_property (lib_type ${name} TYPE )
74- if (lib_type STREQUAL SHARED_LIBRARY AND CMAKE_SYSTEM_NAME STREQUAL Darwin)
75- # Allow install_name_tool to update paths (for rdar://109473564)
76- set_property (TARGET ${name} APPEND_STRING PROPERTY
77- LINK_FLAGS " -Xlinker -headerpad_max_install_names" )
74+ if (lib_type STREQUAL SHARED_LIBRARY)
75+ if (CMAKE_SYSTEM_NAME STREQUAL Darwin)
76+ # Allow install_name_tool to update paths (for rdar://109473564)
77+ set_property (TARGET ${name} APPEND_STRING PROPERTY
78+ LINK_FLAGS " -Xlinker -headerpad_max_install_names" )
79+ elseif (CMAKE_SYSTEM_NAME STREQUAL Linux)
80+ # Make some room to update paths.
81+ set_property (TARGET ${name} APPEND PROPERTY
82+ INSTALL_RPATH ":::::::::::::::::::::::::::::::::::::::::::::::::::::::" )
83+ endif ()
7884 endif ()
7985
8086 # Install this target
You can’t perform that action at this time.
0 commit comments