@@ -180,14 +180,6 @@ include_directories(BEFORE
180
180
${CMAKE_CURRENT_SOURCE_DIR} /include
181
181
)
182
182
183
- if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY )
184
- install (DIRECTORY include /
185
- DESTINATION "${CMAKE_INSTALL_INCLUDEDIR} "
186
- FILES_MATCHING
187
- PATTERN "*.h"
188
- )
189
- endif ()
190
-
191
183
add_subdirectory (Common )
192
184
add_subdirectory (tools/lld )
193
185
@@ -207,4 +199,41 @@ add_subdirectory(MachO)
207
199
add_subdirectory (MinGW )
208
200
add_subdirectory (wasm )
209
201
202
+ add_custom_target (lld-headers )
203
+ set_target_properties (lld-headers PROPERTIES FOLDER "Misc" )
204
+ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY )
205
+ install (DIRECTORY include /lld
206
+ DESTINATION "${CMAKE_INSTALL_INCLUDEDIR} "
207
+ COMPONENT lld-headers
208
+ FILES_MATCHING
209
+ PATTERN "*.h"
210
+ )
211
+
212
+ if (NOT LLVM_ENABLE_IDE )
213
+ add_llvm_install_targets (install -lld-headers
214
+ DEPENDS lld-headers
215
+ COMPONENT lld-headers )
216
+ endif ()
217
+ endif ()
218
+
219
+ # Custom target to install all lld libraries
220
+ add_custom_target (lld-libraries )
221
+ if (NOT LLVM_ENABLE_IDE )
222
+ add_llvm_install_targets (install -lld-libraries
223
+ DEPENDS lld-libraries
224
+ COMPONENT lld-libraries )
225
+ endif ()
226
+
227
+ get_property (LLD_LIBS GLOBAL PROPERTY LLD_ALL_LIBS )
228
+ if (LLD_LIBS )
229
+ list (REMOVE_DUPLICATES LLD_LIBS )
230
+ foreach (lib ${LLD_LIBS} )
231
+ add_dependencies (lld-libraries ${lib} )
232
+ if (NOT LLVM_ENABLE_IDE )
233
+ add_dependencies (install -lld-libraries install -${lib} )
234
+ add_dependencies (install -lld-libraries-stripped install -${lib}-stripped )
235
+ endif ()
236
+ endforeach ()
237
+ endif ()
238
+
210
239
add_subdirectory (cmake/modules )
0 commit comments