diff options
author | Petr Hosek <phosek@chromium.org> | 2017-07-11 01:42:26 +0000 |
---|---|---|
committer | Petr Hosek <phosek@chromium.org> | 2017-07-11 01:42:26 +0000 |
commit | 1f8318f57fe94a1e6e6667be2b2f2c74375c7a08 (patch) | |
tree | 523406e7bf3d709aef5e519cce5017123fa63b50 /CMakeLists.txt | |
parent | c3926621b0d7904282728696bfe5b5a804b064c1 (diff) |
[libcxxabi][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/D33761
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@307611 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 2b3733d..99d4634 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -156,6 +156,13 @@ else() 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}) |