@@ -114,18 +114,18 @@ endfunction()
114
114
# Add a new SourceKit library.
115
115
#
116
116
# Usage:
117
- # add_sourcekit_library(name # Name of the library
118
- # [DEPENDS dep1 ...] # Libraries this library will be linked with
119
- # [TARGET_DEPENDS dep1 ...] # Targets this library depends on
117
+ # add_sourcekit_library(name # Name of the library
118
+ # [LINK_LIBS dep1 ...] # Libraries this library will be linked with
119
+ # [DEPENDS dep1 ...] # Targets this library depends on
120
120
# [LLVM_COMPONENT_DEPENDS comp1 ...] # LLVM components this library depends on
121
- # [INSTALL_IN_COMPONENT comp] # The Swift installation component that this library belongs to.
121
+ # [INSTALL_IN_COMPONENT comp] # The Swift installation component that this library belongs to.
122
122
# [SHARED]
123
123
# source1 [source2 source3 ...]) # Sources to add into this library
124
124
macro (add_sourcekit_library name )
125
125
cmake_parse_arguments (SOURCEKITLIB
126
126
"SHARED"
127
127
"INSTALL_IN_COMPONENT"
128
- "DEPENDS;TARGET_DEPENDS ;LLVM_COMPONENT_DEPENDS"
128
+ "LINK_LIBS;DEPENDS ;LLVM_COMPONENT_DEPENDS"
129
129
${ARGN} )
130
130
set (srcs ${SOURCEKITLIB_UNPARSED_ARGUMENTS} )
131
131
@@ -170,23 +170,23 @@ macro(add_sourcekit_library name)
170
170
add_dependencies (${name} ${LLVM_COMMON_DEPENDS} )
171
171
endif (LLVM_COMMON_DEPENDS )
172
172
173
- if (SOURCEKITLIB_TARGET_DEPENDS )
174
- add_dependencies (${name} ${SOURCEKITLIB_TARGET_DEPENDS } )
175
- endif (SOURCEKITLIB_TARGET_DEPENDS )
173
+ if (SOURCEKITLIB_DEPENDS )
174
+ add_dependencies (${name} ${SOURCEKITLIB_DEPENDS } )
175
+ endif (SOURCEKITLIB_DEPENDS )
176
176
177
177
set (prefixed_link_libraries )
178
- foreach (dep ${SOURCEKITLIB_DEPENDS } )
178
+ foreach (dep ${SOURCEKITLIB_LINK_LIBS } )
179
179
if ("${dep} " MATCHES "^clang" )
180
180
set (dep "${LLVM_LIBRARY_OUTPUT_INTDIR} /lib${dep} .a" )
181
181
endif ()
182
182
list (APPEND prefixed_link_libraries "${dep} " )
183
183
endforeach ()
184
- set (SOURCEKITLIB_DEPENDS "${prefixed_link_libraries} " )
184
+ set (SOURCEKITLIB_LINK_LIBS "${prefixed_link_libraries} " )
185
185
186
186
if ("${libkind} " STREQUAL "SHARED" )
187
- target_link_libraries ("${name} " PRIVATE ${SOURCEKITLIB_DEPENDS } )
187
+ target_link_libraries ("${name} " PRIVATE ${SOURCEKITLIB_LINK_LIBS } )
188
188
else ()
189
- target_link_libraries ("${name} " INTERFACE ${SOURCEKITLIB_DEPENDS } )
189
+ target_link_libraries ("${name} " INTERFACE ${SOURCEKITLIB_LINK_LIBS } )
190
190
endif ()
191
191
192
192
swift_common_llvm_config (${name} ${SOURCEKITLIB_LLVM_COMPONENT_DEPENDS} )
@@ -228,18 +228,18 @@ endmacro()
228
228
# Add a new SourceKit executable.
229
229
#
230
230
# Usage:
231
- # add_sourcekit_executable(name # Name of the executable
232
- # [DEPENDS dep1 ...] # Libraries this executable depends on
233
- # [LLVM_COMPONENT_DEPENDS comp1 ...] # LLVM components this executable
234
- # # depends on
231
+ # add_sourcekit_executable(name # Name of the executable
232
+ # [LINK_LIBS dep1 ...] # Libraries this executable depends on
233
+ # [LLVM_COMPONENT_DEPENDS comp1 ...] # LLVM components this executable
234
+ # # depends on
235
235
# [EXCLUDE_FROM_ALL] # Whether to exclude this executable from
236
236
# # the ALL_BUILD target
237
237
# source1 [source2 source3 ...]) # Sources to add into this executable
238
238
macro (add_sourcekit_executable name )
239
239
cmake_parse_arguments (SOURCEKITEXE
240
240
"EXCLUDE_FROM_ALL"
241
241
""
242
- "DEPENDS ;LLVM_COMPONENT_DEPENDS"
242
+ "LINK_LIBS ;LLVM_COMPONENT_DEPENDS"
243
243
${ARGN} )
244
244
245
245
if (${SOURCEKITEXE_EXCLUDE_FROM_ALL} )
@@ -257,7 +257,7 @@ macro(add_sourcekit_executable name)
257
257
add_dependencies (${name} ${LLVM_COMMON_DEPENDS} )
258
258
endif ()
259
259
260
- target_link_libraries (${name} ${SOURCEKITEXE_DEPENDS } )
260
+ target_link_libraries (${name} ${SOURCEKITEXE_LINK_LIBS } )
261
261
swift_common_llvm_config (${name} ${SOURCEKITEXE_LLVM_COMPONENT_DEPENDS} )
262
262
target_link_libraries (${name} ${LLVM_COMMON_LIBS} )
263
263
@@ -280,14 +280,14 @@ endmacro()
280
280
#
281
281
# Usage:
282
282
# add_sourcekit_framework(name # Name of the framework
283
- # [DEPENDS dep1 ...] # Libraries this framework depends on
283
+ # [LINK_LIBS dep1 ...] # Libraries this framework will link with
284
284
# [LLVM_COMPONENT_DEPENDS comp1 ...] # LLVM components this framework depends on
285
285
# [MODULEMAP modulemap] # Module map file for this framework
286
286
# [INSTALL_IN_COMPONENT comp] # The Swift installation component that this framework belongs to.
287
287
# source1 [source2 source3 ...]) # Sources to add into this framework
288
288
macro (add_sourcekit_framework name )
289
289
cmake_parse_arguments (SOURCEKITFW
290
- "" "MODULEMAP;INSTALL_IN_COMPONENT" "DEPENDS ;LLVM_COMPONENT_DEPENDS" ${ARGN} )
290
+ "" "MODULEMAP;INSTALL_IN_COMPONENT" "LINK_LIBS ;LLVM_COMPONENT_DEPENDS" ${ARGN} )
291
291
set (srcs ${SOURCEKITFW_UNPARSED_ARGUMENTS} )
292
292
293
293
set (lib_dir ${SOURCEKIT_LIBRARY_OUTPUT_INTDIR} )
@@ -329,7 +329,7 @@ macro(add_sourcekit_framework name)
329
329
add_dependencies (${name} ${LLVM_COMMON_DEPENDS} )
330
330
endif (LLVM_COMMON_DEPENDS )
331
331
332
- target_link_libraries (${name} PRIVATE ${SOURCEKITFW_DEPENDS } )
332
+ target_link_libraries (${name} PRIVATE ${SOURCEKITFW_LINK_LIBS } )
333
333
swift_common_llvm_config (${name} ${SOURCEKITFW_LLVM_COMPONENT_DEPENDS} )
334
334
335
335
if (EXPORTED_SYMBOL_FILE )
@@ -395,12 +395,12 @@ endmacro(add_sourcekit_framework)
395
395
# Add a new SourceKit XPC service to a framework.
396
396
#
397
397
# Usage:
398
- # add_sourcekit_xpc_service(name # Name of the XPC service
399
- # [DEPENDS dep1 ...] # Libraries this service depends on
398
+ # add_sourcekit_xpc_service(name # Name of the XPC service
399
+ # [LINK_LIBS dep1 ...] # Libraries this service will link with
400
400
# [LLVM_COMPONENT_DEPENDS comp1 ...] # LLVM components this service depends on
401
- # source1 [source2 source3 ...]) # Sources to add into this service
401
+ # source1 [source2 source3 ...]) # Sources to add into this service
402
402
macro (add_sourcekit_xpc_service name framework_target )
403
- cmake_parse_arguments (SOURCEKITXPC "" "" "DEPENDS ;LLVM_COMPONENT_DEPENDS" ${ARGN} )
403
+ cmake_parse_arguments (SOURCEKITXPC "" "" "LINK_LIBS ;LLVM_COMPONENT_DEPENDS" ${ARGN} )
404
404
set (srcs ${SOURCEKITXPC_UNPARSED_ARGUMENTS} )
405
405
406
406
set (lib_dir ${SOURCEKIT_LIBRARY_OUTPUT_INTDIR} )
@@ -441,7 +441,7 @@ macro(add_sourcekit_xpc_service name framework_target)
441
441
add_dependencies (${name} ${LLVM_COMMON_DEPENDS} )
442
442
endif (LLVM_COMMON_DEPENDS )
443
443
444
- target_link_libraries (${name} ${SOURCEKITXPC_DEPENDS } )
444
+ target_link_libraries (${name} ${SOURCEKITXPC_LINK_LIBS } )
445
445
swift_common_llvm_config (${name} ${SOURCEKITXPC_LLVM_COMPONENT_DEPENDS} )
446
446
target_link_libraries (${name} ${LLVM_COMMON_LIBS} )
447
447
0 commit comments