[M68k] Fix assertion build after cc6a5ea6e33d3febafc4334617230c528a0c4fa7
[llvm-project.git] / libunwind / include / CMakeLists.txt
blob51065d68afd4eaeb8ef8b87bf9e91bf76988d094
1 set(files
2     __libunwind_config.h
3     libunwind.h
4     libunwind.modulemap
5     mach-o/compact_unwind_encoding.h
6     mach-o/compact_unwind_encoding.modulemap
7     unwind_arm_ehabi.h
8     unwind_itanium.h
9     unwind.h
10     )
12 add_library(unwind-headers INTERFACE)
13 target_include_directories(unwind-headers INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})
15 if(LIBUNWIND_INSTALL_HEADERS)
16   foreach(file ${files})
17     get_filename_component(dir ${file} DIRECTORY)
18     install(FILES ${file}
19       DESTINATION "${LIBUNWIND_INSTALL_INCLUDE_DIR}/${dir}"
20       COMPONENT unwind-headers
21       PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
22     )
23   endforeach()
25   if(NOT CMAKE_CONFIGURATION_TYPES)
26     add_custom_target(install-unwind-headers
27       DEPENDS unwind-headers
28       COMMAND "${CMAKE_COMMAND}"
29               -DCMAKE_INSTALL_COMPONENT=unwind-headers
30               -P "${LIBUNWIND_BINARY_DIR}/cmake_install.cmake")
31     add_custom_target(install-unwind-headers-stripped DEPENDS install-unwind-headers)
32   endif()
33 endif()