[libunwind] r308380 - [CMake] Set library dir to be LLVM's intermediate output dir
Petr Hosek via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 18 14:30:18 PDT 2017
Author: phosek
Date: Tue Jul 18 14:30:18 2017
New Revision: 308380
URL: http://llvm.org/viewvc/llvm-project?rev=308380&view=rev
Log:
[CMake] Set library dir to be LLVM's intermediate output dir
This matches the behavior of libc++abi and libc++ and ensures that
we get a working toolchain when building libunwind as part of LLVM.
Differential Revision: https://reviews.llvm.org/D34375
Modified:
libunwind/trunk/CMakeLists.txt
Modified: libunwind/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/libunwind/trunk/CMakeLists.txt?rev=308380&r1=308379&r2=308380&view=diff
==============================================================================
--- libunwind/trunk/CMakeLists.txt (original)
+++ libunwind/trunk/CMakeLists.txt Tue Jul 18 14:30:18 2017
@@ -162,7 +162,15 @@ set(CMAKE_MODULE_PATH
set(LIBUNWIND_COMPILER ${CMAKE_CXX_COMPILER})
set(LIBUNWIND_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
set(LIBUNWIND_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR})
-set(LIBUNWIND_LIBRARY_DIR ${CMAKE_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX})
+if (LLVM_LIBRARY_OUTPUT_INTDIR)
+ set(LIBUNWIND_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR})
+else()
+ set(LIBUNWIND_LIBRARY_DIR ${CMAKE_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX})
+endif()
+
+set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${LIBUNWIND_LIBRARY_DIR})
+set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${LIBUNWIND_LIBRARY_DIR})
+set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${LIBUNWIND_LIBRARY_DIR})
set(LIBUNWIND_INSTALL_PREFIX "" CACHE STRING
"Define libunwind destination prefix.")
More information about the cfe-commits
mailing list