[PATCH] D32735: [libcxxabi][CMake] Set library dir when built under runtimes/

Jonas Hahnfeld via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue May 2 00:28:27 PDT 2017


Hahnfeld created this revision.
Herald added a subscriber: mgorny.
Herald added a reviewer: EricWF.

This will put libraries into the build root's lib/ directory by default.


https://reviews.llvm.org/D32735

Files:
  CMakeLists.txt


Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt
+++ CMakeLists.txt
@@ -239,7 +239,11 @@
 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})


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D32735.97402.patch
Type: text/x-patch
Size: 705 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170502/7d829dfd/attachment.bin>


More information about the cfe-commits mailing list