File tree 3 files changed +5
-11
lines changed
3 files changed +5
-11
lines changed Original file line number Diff line number Diff line change @@ -91,6 +91,11 @@ set(CMAKE_C_VISIBILITY_INLINES_HIDDEN YES)
91
91
set (CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR} )
92
92
set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR} )
93
93
94
+ set (CMAKE_POSITION_INDEPENDENT_CODE YES )
95
+ if (NOT APPLE )
96
+ set (CMAKE_INSTALL_RPATH "$ORIGIN" )
97
+ endif ()
98
+
94
99
set (CMAKE_THREAD_PREFER_PTHREAD TRUE )
95
100
set (THREADS_PREFER_PTHREAD_FLAG TRUE )
96
101
if (ANDROID)
Original file line number Diff line number Diff line change @@ -88,10 +88,6 @@ if(HAVE_OBJC)
88
88
swift/DispatchStubs.cc)
89
89
endif ()
90
90
91
-
92
- set_target_properties (dispatch PROPERTIES
93
- POSITION_INDEPENDENT_CODE YES )
94
-
95
91
target_include_directories (dispatch PUBLIC
96
92
${PROJECT_BINARY_DIR}
97
93
${PROJECT_SOURCE_DIR}
@@ -171,10 +167,6 @@ if(APPLE)
171
167
"-Xlinker -alias_list -Xlinker ${PROJECT_SOURCE_DIR} /xcodeconfig/libdispatch.aliases" )
172
168
endif ()
173
169
174
- if (NOT APPLE )
175
- set_target_properties (dispatch PROPERTIES INSTALL_RPATH "$ORIGIN" )
176
- endif ()
177
-
178
170
if (LINKER_SUPPORTS_BUILD_ID)
179
171
target_link_options (dispatch PRIVATE "LINKER:--build-id=sha1" )
180
172
endif ()
Original file line number Diff line number Diff line change @@ -3,8 +3,6 @@ if(HAVE_OBJC)
3
3
DispatchStubs.cc)
4
4
target_include_directories (DispatchStubs PRIVATE
5
5
${PROJECT_SOURCE_DIR} )
6
- set_target_properties (DispatchStubs PROPERTIES
7
- POSITION_INDEPENDENT_CODE YES )
8
6
endif ()
9
7
10
8
add_library (swiftDispatch
@@ -35,7 +33,6 @@ target_link_libraries(swiftDispatch PUBLIC
35
33
dispatch)
36
34
if (NOT DARWIN AND NOT WIN32 )
37
35
target_link_options (swiftDispatch PRIVATE "SHELL:-no-toolchain-stdlib-rpath" )
38
- set_target_properties (swiftDispatch PROPERTIES INSTALL_RPATH "$ORIGIN" )
39
36
endif ()
40
37
41
38
set_property (GLOBAL APPEND PROPERTY DISPATCH_EXPORTS swiftDispatch)
You can’t perform that action at this time.
0 commit comments