llvm-project/libunwind/include/CMakeLists.txt
Ian Anderson 172c4a4a14
[libunwind] Stop installing the mach-o module map (#105616)
libunwind shouldn't know that compact_unwind_encoding.h is part of a
MachO module that it doesn't own. Delete the mach-o module map, and let
whatever is in charge of the mach-o directory be the one to say how its
module is organized and where compact_unwind_encoding.h fits in.
2024-08-22 13:44:58 -07:00

33 lines
969 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}"
-DCMAKE_INSTALL_COMPONENT=unwind-headers
-P "${LIBUNWIND_BINARY_DIR}/cmake_install.cmake")
add_custom_target(install-unwind-headers-stripped DEPENDS install-unwind-headers)
endif()
endif()