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