7 set(src "${CMAKE_CURRENT_SOURCE_DIR}/${f}")
8 set(dst "${LIBCXXABI_GENERATED_INCLUDE_DIR}/${f}")
9 add_custom_command(OUTPUT ${dst}
11 COMMAND ${CMAKE_COMMAND} -E copy_if_different ${src} ${dst}
12 COMMENT "Copying CXXABI header ${f}")
13 list(APPEND _all_includes "${dst}")
16 add_custom_target(generate-cxxabi-headers ALL DEPENDS ${_all_includes})
18 add_library(cxxabi-headers INTERFACE)
19 add_dependencies(cxxabi-headers generate-cxxabi-headers)
20 target_include_directories(cxxabi-headers INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}")
22 if (LIBCXXABI_INSTALL_HEADERS)
23 foreach(file ${files})
24 get_filename_component(dir ${file} DIRECTORY)
26 DESTINATION ${LIBCXXABI_INSTALL_INCLUDE_DIR}/${dir}
27 COMPONENT cxxabi-headers
28 PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
32 add_custom_target(install-cxxabi-headers
33 DEPENDS cxxabi-headers
34 COMMAND "${CMAKE_COMMAND}"
35 -DCMAKE_INSTALL_COMPONENT=cxxabi-headers
36 -P "${CMAKE_BINARY_DIR}/cmake_install.cmake")
37 # Stripping is a no-op for headers
38 add_custom_target(install-cxxabi-headers-stripped DEPENDS install-cxxabi-headers)