llvm.org GIT mirror llvm / 5778c9e
Export lib and exe build target names from build tree Record every logical target that we install with install(TARGETS) in a global LLVM_EXPORTS property. Then use the export(TARGETS) command to provide a "LLVMExports.cmake" file that exports logical targets for import into applications directly from our build tree. The "LLVMExports.cmake" file is not meant for direct inclusion by application code but should be included by "LLVMConfig.cmake" in a future change. Contributed by Brad King. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201050 91177308-0d34-0410-b5e6-96231b3b80d8 NAKAMURA Takumi 5 years ago
3 changed file(s) with 10 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
198198 LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}
199199 ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX})
200200 endif()
201 set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS ${name})
201202 endif()
202203 set_target_properties(${name} PROPERTIES FOLDER "Libraries")
203204
250251 LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}
251252 ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX})
252253 endif()
254 set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS ${name})
253255 endif()
254256 endif()
255257
299301 EXPORT LLVMExports
300302 RUNTIME DESTINATION bin)
301303 endif()
304 endif()
305 if( LLVM_BUILD_TOOLS )
306 set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS ${name})
302307 endif()
303308 set_target_properties(${name} PROPERTIES FOLDER "Tools")
304309 endmacro(add_llvm_tool name)
0 set(LLVM_INSTALL_PACKAGE_DIR share/llvm/cmake)
11 set(llvm_cmake_builddir "${LLVM_BINARY_DIR}/${LLVM_INSTALL_PACKAGE_DIR}")
2
3 get_property(LLVM_EXPORTS GLOBAL PROPERTY LLVM_EXPORTS)
4 export(TARGETS ${LLVM_EXPORTS}
5 FILE ${llvm_cmake_builddir}/LLVMExports.cmake)
26
37 get_property(llvm_libs GLOBAL PROPERTY LLVM_LIBS)
48
130130 EXPORT LLVMExports
131131 RUNTIME DESTINATION bin)
132132 endif()
133 set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS ${target})
133134 endmacro()