[PATCH] D33761: [libcxxabi][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:35 PDT 2017
phosek updated this revision to Diff 105690.
Repository:
rL LLVM
https://reviews.llvm.org/D33761
Files:
CMakeLists.txt
src/CMakeLists.txt
Index: src/CMakeLists.txt
===================================================================
--- src/CMakeLists.txt
+++ src/CMakeLists.txt
@@ -174,8 +174,8 @@
add_custom_target(cxxabi DEPENDS ${LIBCXXABI_TARGETS})
install(TARGETS ${LIBCXXABI_TARGETS}
- LIBRARY DESTINATION lib${LIBCXXABI_LIBDIR_SUFFIX} COMPONENT cxxabi
- ARCHIVE DESTINATION lib${LIBCXXABI_LIBDIR_SUFFIX} COMPONENT cxxabi
+ LIBRARY DESTINATION ${LIBCXXABI_INSTALL_PREFIX}lib${LIBCXXABI_LIBDIR_SUFFIX} COMPONENT cxxabi
+ ARCHIVE DESTINATION ${LIBCXXABI_INSTALL_PREFIX}lib${LIBCXXABI_LIBDIR_SUFFIX} COMPONENT cxxabi
)
if (NOT CMAKE_CONFIGURATION_TYPES)
Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt
+++ CMakeLists.txt
@@ -156,6 +156,13 @@
set(LIBCXXABI_LIBRARY_DIR ${CMAKE_BINARY_DIR}/lib${LIBCXXABI_LIBDIR_SUFFIX})
endif()
+set(LIBCXXABI_INSTALL_PREFIX "" CACHE STRING
+ "Define libc++abi destination prefix.")
+
+if (NOT LIBCXXABI_INSTALL_PREFIX MATCHES "^$|.*/")
+ message(FATAL_ERROR "LIBCXXABI_INSTALL_PREFIX has to end with \"/\".")
+endif()
+
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${LIBCXXABI_LIBRARY_DIR})
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${LIBCXXABI_LIBRARY_DIR})
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${LIBCXXABI_LIBRARY_DIR})
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D33761.105690.patch
Type: text/x-patch
Size: 1289 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170709/c3aca686/attachment.bin>
More information about the llvm-commits
mailing list