[libcxx] r302117 - [libcxx][CMake] Set library dir when built under runtimes/
Jonas Hahnfeld via cfe-commits
cfe-commits at lists.llvm.org
Wed May 3 23:02:51 PDT 2017
Author: hahnfeld
Date: Thu May 4 01:02:50 2017
New Revision: 302117
URL: http://llvm.org/viewvc/llvm-project?rev=302117&view=rev
Log:
[libcxx][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/D32736
Modified:
libcxx/trunk/CMakeLists.txt
Modified: libcxx/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/CMakeLists.txt?rev=302117&r1=302116&r2=302117&view=diff
==============================================================================
--- libcxx/trunk/CMakeLists.txt (original)
+++ libcxx/trunk/CMakeLists.txt Thu May 4 01:02:50 2017
@@ -344,7 +344,11 @@ set(LIBCXX_COMPILER ${CMAKE_CXX_COMPI
set(LIBCXX_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
set(LIBCXX_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR})
set(LIBCXX_BINARY_INCLUDE_DIR "${LIBCXX_BINARY_DIR}/include/c++build")
-set(LIBCXX_LIBRARY_DIR ${CMAKE_BINARY_DIR}/lib${LIBCXX_LIBDIR_SUFFIX})
+if (LLVM_LIBRARY_OUTPUT_INTDIR)
+ set(LIBCXX_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR})
+else()
+ set(LIBCXX_LIBRARY_DIR ${CMAKE_BINARY_DIR}/lib${LIBCXX_LIBDIR_SUFFIX})
+endif()
file(MAKE_DIRECTORY "${LIBCXX_BINARY_INCLUDE_DIR}")
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${LIBCXX_LIBRARY_DIR})
More information about the cfe-commits
mailing list