From 347be61138344a566133e99b4514b1da16a81c87 Mon Sep 17 00:00:00 2001 From: Petr Hosek Date: Tue, 11 Jul 2017 02:39:50 +0000 Subject: [libcxx][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/D33762 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@307615 91177308-0d34-0410-b5e6-96231b3b80d8 --- CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 5b5971036..1f8b24d17 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -352,6 +352,13 @@ else() endif() file(MAKE_DIRECTORY "${LIBCXX_BINARY_INCLUDE_DIR}") +set(LIBCXX_INSTALL_PREFIX "" CACHE STRING + "Define libc++ destination prefix.") + +if (NOT LIBCXX_INSTALL_PREFIX MATCHES "^$|.*/") + message(FATAL_ERROR "LIBCXX_INSTALL_PREFIX has to end with \"/\".") +endif() + set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${LIBCXX_LIBRARY_DIR}) set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${LIBCXX_LIBRARY_DIR}) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${LIBCXX_LIBRARY_DIR}) -- cgit v1.2.3