This patch moves away from using cmake_install scripts to install the various targets when building runtimes, since those have been deprecated by CMake. Instead, we use `cmake --install` which is the prefered method. This patch also localizes how we set dependencies on the various installation targets, allowing the removal of a few global variables that were used as lists. Finally, it makes the way we set up installation targets for libc++, libc++abi and libunwind consistent again.
31 lines
911 B
CMake
31 lines
911 B
CMake
set(files
|
|
__libunwind_config.h
|
|
libunwind.h
|
|
libunwind.modulemap
|
|
mach-o/compact_unwind_encoding.h
|
|
unwind_arm_ehabi.h
|
|
unwind_itanium.h
|
|
unwind.h
|
|
)
|
|
|
|
add_library(unwind-headers INTERFACE)
|
|
target_include_directories(unwind-headers INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})
|
|
|
|
if(LIBUNWIND_INSTALL_HEADERS)
|
|
foreach(file ${files})
|
|
get_filename_component(dir ${file} DIRECTORY)
|
|
install(FILES ${file}
|
|
DESTINATION "${LIBUNWIND_INSTALL_INCLUDE_DIR}/${dir}"
|
|
COMPONENT unwind-headers
|
|
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
|
|
)
|
|
endforeach()
|
|
|
|
if (NOT CMAKE_CONFIGURATION_TYPES)
|
|
add_custom_target(install-unwind-headers
|
|
DEPENDS unwind-headers
|
|
COMMAND "${CMAKE_COMMAND}" --install "${CMAKE_BINARY_DIR}" --component unwind-headers)
|
|
add_custom_target(install-unwind-headers-stripped DEPENDS install-unwind-headers)
|
|
endif()
|
|
endif()
|