Skip to content

Commit 57aa0d4

Browse files
Jonas HahnfeldJonas Hahnfeld
authored andcommitted
[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 llvm-svn: 302118
1 parent 98a7f27 commit 57aa0d4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

libcxxabi/CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,11 @@ set(CMAKE_MODULE_PATH
239239
set(LIBCXXABI_COMPILER ${CMAKE_CXX_COMPILER})
240240
set(LIBCXXABI_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
241241
set(LIBCXXABI_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR})
242-
set(LIBCXXABI_LIBRARY_DIR ${CMAKE_BINARY_DIR}/lib${LIBCXXABI_LIBDIR_SUFFIX})
242+
if (LLVM_LIBRARY_OUTPUT_INTDIR)
243+
set(LIBCXXABI_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR})
244+
else()
245+
set(LIBCXXABI_LIBRARY_DIR ${CMAKE_BINARY_DIR}/lib${LIBCXXABI_LIBDIR_SUFFIX})
246+
endif()
243247

244248
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${LIBCXXABI_LIBRARY_DIR})
245249
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${LIBCXXABI_LIBRARY_DIR})

0 commit comments

Comments
 (0)