summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorJonas Hahnfeld <Hahnfeld@itc.rwth-aachen.de>2017-05-04 06:04:49 +0000
committerJonas Hahnfeld <Hahnfeld@itc.rwth-aachen.de>2017-05-04 06:04:49 +0000
commita4c4545b530e48d5d8ba3bf6a300284e4fa67192 (patch)
tree02a37b274e7888db4cba1f0bd609dba5939b08fb /CMakeLists.txt
parent700fa3562ffeb4e6416bb07fa731ea98105604d3 (diff)
[libcxxabi][CMake] Set library dir when built under runtimes/
This will put libraries into the build root's lib/ directory by default. Differential Revision: https://reviews.llvm.org/D32735 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@302118 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt6
1 files changed, 5 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 505cbfc..349e613 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -239,7 +239,11 @@ set(CMAKE_MODULE_PATH
set(LIBCXXABI_COMPILER ${CMAKE_CXX_COMPILER})
set(LIBCXXABI_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
set(LIBCXXABI_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR})
-set(LIBCXXABI_LIBRARY_DIR ${CMAKE_BINARY_DIR}/lib${LIBCXXABI_LIBDIR_SUFFIX})
+if (LLVM_LIBRARY_OUTPUT_INTDIR)
+ set(LIBCXXABI_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR})
+else()
+ set(LIBCXXABI_LIBRARY_DIR ${CMAKE_BINARY_DIR}/lib${LIBCXXABI_LIBDIR_SUFFIX})
+endif()
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${LIBCXXABI_LIBRARY_DIR})
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${LIBCXXABI_LIBRARY_DIR})