[libunwind] r307606 - [libunwind][CMake] Add install path variable to allow overriding the destination
Petr Hosek via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 10 18:12:09 PDT 2017
Author: phosek
Date: Mon Jul 10 18:12:09 2017
New Revision: 307606
URL: http://llvm.org/viewvc/llvm-project?rev=307606&view=rev
Log:
[libunwind][CMake] Add install path variable to allow overriding the destination
This is going to be used by the runtime build in the multi-target
setup to allow using different install prefix for each target.
Differential Revision: https://reviews.llvm.org/D33760
Modified:
libunwind/trunk/CMakeLists.txt
libunwind/trunk/src/CMakeLists.txt
Modified: libunwind/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/libunwind/trunk/CMakeLists.txt?rev=307606&r1=307605&r2=307606&view=diff
==============================================================================
--- libunwind/trunk/CMakeLists.txt (original)
+++ libunwind/trunk/CMakeLists.txt Mon Jul 10 18:12:09 2017
@@ -164,6 +164,13 @@ set(LIBUNWIND_SOURCE_DIR ${CMAKE_CURREN
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 "")
Modified: libunwind/trunk/src/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/libunwind/trunk/src/CMakeLists.txt?rev=307606&r1=307605&r2=307606&view=diff
==============================================================================
--- libunwind/trunk/src/CMakeLists.txt (original)
+++ libunwind/trunk/src/CMakeLists.txt Mon Jul 10 18:12:09 2017
@@ -133,6 +133,6 @@ endif()
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})
More information about the cfe-commits
mailing list