[PATCH] D33760: [libunwind][CMake] Add install path variable to allow overriding the destination
Petr Hosek via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Jul 9 06:14:33 PDT 2017
phosek updated this revision to Diff 105689.
Repository:
rL LLVM
https://reviews.llvm.org/D33760
Files:
CMakeLists.txt
src/CMakeLists.txt
Index: src/CMakeLists.txt
===================================================================
--- src/CMakeLists.txt
+++ src/CMakeLists.txt
@@ -133,6 +133,6 @@
add_custom_target(unwind DEPENDS ${LIBUNWIND_TARGETS})
install(TARGETS ${LIBUNWIND_TARGETS}
- LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}
- ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX})
+ LIBRARY DESTINATION ${LIBUNWIND_INSTALL_PREFIX}lib${LLVM_LIBDIR_SUFFIX}
+ ARCHIVE DESTINATION ${LIBUNWIND_INSTALL_PREFIX}lib${LLVM_LIBDIR_SUFFIX})
Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt
+++ CMakeLists.txt
@@ -164,6 +164,13 @@
set(LIBUNWIND_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR})
set(LIBUNWIND_LIBRARY_DIR ${CMAKE_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX})
+set(LIBUNWIND_INSTALL_PREFIX "" CACHE STRING
+ "Define libunwind destination prefix.")
+
+if (NOT LIBUNWIND_INSTALL_PREFIX MATCHES "^$|.*/")
+ message(FATAL_ERROR "LIBUNWIND_INSTALL_PREFIX has to end with \"/\".")
+endif()
+
set(LIBUNWIND_C_FLAGS "")
set(LIBUNWIND_CXX_FLAGS "")
set(LIBUNWIND_COMPILE_FLAGS "")
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D33760.105689.patch
Type: text/x-patch
Size: 1117 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170709/d8d29579/attachment.bin>
More information about the llvm-commits
mailing list