[Lldb-commits] [PATCH] D25570: [CMake] Populate LLDB.framework's headers directory
Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Fri Oct 14 10:19:08 PDT 2016
This revision was automatically updated to reflect the committed changes.
Closed by commit rL284250: [CMake] Populate LLDB.framework's headers directory (authored by cbieneman).
Changed prior to commit:
https://reviews.llvm.org/D25570?vs=74543&id=74708#toc
Repository:
rL LLVM
https://reviews.llvm.org/D25570
Files:
lldb/trunk/source/API/CMakeLists.txt
Index: lldb/trunk/source/API/CMakeLists.txt
===================================================================
--- lldb/trunk/source/API/CMakeLists.txt
+++ lldb/trunk/source/API/CMakeLists.txt
@@ -135,10 +135,26 @@
target_link_libraries(liblldb PRIVATE ${LLDB_SYSTEM_LIBS})
if(LLDB_BUILD_FRAMEWORK)
+ file(GLOB public_headers ${LLDB_SOURCE_DIR}/include/lldb/API/*.h)
set_target_properties(liblldb PROPERTIES
OUTPUT_NAME LLDB
FRAMEWORK On
FRAMEWORK_VERSION ${LLDB_FRAMEWORK_VERSION}
- LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${LLDB_FRAMEWORK_INSTALL_DIR})
+ LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${LLDB_FRAMEWORK_INSTALL_DIR}
+ PUBLIC_HEADER "${public_headers}")
+
+ # This works around a CMake bug where POST_BUILD steps are not applied to
+ # framework targets. This fix is merged into the CMake release branch and
+ # should be available with CMake 3.7 rc2:
+ # https://gitlab.kitware.com/cmake/cmake/issues/16363
+ if(CMAKE_VERSION VERSION_GREATER 3.6.99)
+ add_custom_command(TARGET liblldb POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -E create_symlink ${LLDB_SOURCE_DIR}/include/lldb/API $<TARGET_FILE_DIR:liblldb>/Headers)
+ else()
+ add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${LLDB_FRAMEWORK_INSTALL_DIR}/LLDB.framework/Versions/${LLDB_FRAMEWORK_VERSION}/Headers
+ COMMAND ${CMAKE_COMMAND} -E create_symlink ${LLDB_SOURCE_DIR}/include/lldb/API $<TARGET_FILE_DIR:liblldb>/Headers)
+ add_custom_target(lldb_header_symlink
+ DEPENDS ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${LLDB_FRAMEWORK_INSTALL_DIR}/LLDB.framework/Versions/${LLDB_FRAMEWORK_VERSION}/Headers)
+ endif()
endif()
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D25570.74708.patch
Type: text/x-patch
Size: 1682 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20161014/806c92ab/attachment.bin>
More information about the lldb-commits
mailing list