[libcxx-commits] [PATCH] D116873: [libunwind][cmake] Create `LIBUNWIND_INSTALL_INCLUDE_DIR` CACHE PATH

John Ericson via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sat Jan 8 16:13:27 PST 2022


Ericson2314 updated this revision to Diff 398382.
Ericson2314 added a comment.

Fix typo


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D116873/new/

https://reviews.llvm.org/D116873

Files:
  libunwind/CMakeLists.txt
  libunwind/include/CMakeLists.txt


Index: libunwind/include/CMakeLists.txt
===================================================================
--- libunwind/include/CMakeLists.txt
+++ libunwind/include/CMakeLists.txt
@@ -14,7 +14,7 @@
   foreach(file ${files})
     get_filename_component(dir ${file} DIRECTORY)
     install(FILES ${file}
-      DESTINATION "include/${dir}"
+      DESTINATION "${LIBUNWIND_INSTALL_INCLUDE_DIR}/${dir}"
       COMPONENT unwind-headers
       PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
     )
Index: libunwind/CMakeLists.txt
===================================================================
--- libunwind/CMakeLists.txt
+++ libunwind/CMakeLists.txt
@@ -139,6 +139,8 @@
 
 if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
   set(LIBUNWIND_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}/${LLVM_DEFAULT_TARGET_TRIPLE})
+  set(LIBUNWIND_INSTALL_INCLUDE_DIR "include/${LLVM_DEFAULT_TARGET_TRIPLE}" CACHE PATH
+      "Path where built libunwind headers should be installed.")
   set(LIBUNWIND_INSTALL_LIBRARY_DIR lib${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE} CACHE PATH
       "Path where built libunwind libraries should be installed.")
   set(LIBUNWIND_INSTALL_RUNTIME_DIR bin CACHE PATH
@@ -147,14 +149,14 @@
     string(APPEND LIBUNWIND_LIBRARY_DIR /${LIBUNWIND_LIBDIR_SUBDIR})
     string(APPEND LIBUNWIND_INSTALL_LIBRARY_DIR /${LIBUNWIND_LIBDIR_SUBDIR})
   endif()
-elseif(LLVM_LIBRARY_OUTPUT_INTDIR)
-  set(LIBUNWIND_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR})
-  set(LIBUNWIND_INSTALL_LIBRARY_DIR lib${LIBUNWIND_LIBDIR_SUFFIX} CACHE PATH
-      "Path where built libunwind libraries should be installed.")
-  set(LIBUNWIND_INSTALL_RUNTIME_DIR bin CACHE PATH
-      "Path where built libunwind runtime libraries should be installed.")
 else()
-  set(LIBUNWIND_LIBRARY_DIR ${CMAKE_BINARY_DIR}/lib${LIBUNWIND_LIBDIR_SUFFIX})
+  if(LLVM_LIBRARY_OUTPUT_INTDIR)
+    set(LIBUNWIND_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR})
+  else()
+    set(LIBUNWIND_LIBRARY_DIR ${CMAKE_BINARY_DIR}/lib${LIBUNWIND_LIBDIR_SUFFIX})
+  endif()
+  set(LIBUNWIND_INSTALL_INCLUDE_DIR include CACHE PATH
+      "Path where built libunwind headers should be installed.")
   set(LIBUNWIND_INSTALL_LIBRARY_DIR lib${LIBUNWIND_LIBDIR_SUFFIX} CACHE PATH
       "Path where built libunwind libraries should be installed.")
   set(LIBUNWIND_INSTALL_RUNTIME_DIR bin CACHE PATH


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D116873.398382.patch
Type: text/x-patch
Size: 2363 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20220109/7eafe6f8/attachment.bin>


More information about the libcxx-commits mailing list