From c4e8a2136c00473f42e54a05bd2634ffc08388ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Wed, 11 Aug 2021 13:44:06 +0300 Subject: [runtimes] Allow overriding where CMake installs RUNTIME type libraries (DLLs) Differential Revision: https://reviews.llvm.org/D107892 --- libunwind/CMakeLists.txt | 6 ++++++ libunwind/src/CMakeLists.txt | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'libunwind') diff --git a/libunwind/CMakeLists.txt b/libunwind/CMakeLists.txt index 3d4c4be..db202a7 100644 --- a/libunwind/CMakeLists.txt +++ b/libunwind/CMakeLists.txt @@ -123,6 +123,8 @@ if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE) set(LIBUNWIND_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}/${LLVM_DEFAULT_TARGET_TRIPLE}) set(LIBUNWIND_INSTALL_LIBRARY_DIR lib${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE} CACHE PATH "Path where built libunwind libraries should be installed.") + set(LIBUNWIND_INSTALL_RUNTIME_DIR bin CACHE PATH + "Path where built libunwind runtime libraries should be installed.") if(LIBCXX_LIBDIR_SUBDIR) string(APPEND LIBUNWIND_LIBRARY_DIR /${LIBUNWIND_LIBDIR_SUBDIR}) string(APPEND LIBUNWIND_INSTALL_LIBRARY_DIR /${LIBUNWIND_LIBDIR_SUBDIR}) @@ -131,10 +133,14 @@ elseif(LLVM_LIBRARY_OUTPUT_INTDIR) set(LIBUNWIND_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}) set(LIBUNWIND_INSTALL_LIBRARY_DIR lib${LIBUNWIND_LIBDIR_SUFFIX} CACHE PATH "Path where built libunwind libraries should be installed.") + set(LIBUNWIND_INSTALL_RUNTIME_DIR bin CACHE PATH + "Path where built libunwind runtime libraries should be installed.") else() set(LIBUNWIND_LIBRARY_DIR ${CMAKE_BINARY_DIR}/lib${LIBUNWIND_LIBDIR_SUFFIX}) set(LIBUNWIND_INSTALL_LIBRARY_DIR lib${LIBUNWIND_LIBDIR_SUFFIX} CACHE PATH "Path where built libunwind libraries should be installed.") + set(LIBUNWIND_INSTALL_RUNTIME_DIR bin CACHE PATH + "Path where built libunwind runtime libraries should be installed.") endif() set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${LIBUNWIND_LIBRARY_DIR}) diff --git a/libunwind/src/CMakeLists.txt b/libunwind/src/CMakeLists.txt index 5794038..ce3217f 100644 --- a/libunwind/src/CMakeLists.txt +++ b/libunwind/src/CMakeLists.txt @@ -193,7 +193,7 @@ if (LIBUNWIND_INSTALL_LIBRARY) install(TARGETS ${LIBUNWIND_INSTALL_TARGETS} LIBRARY DESTINATION ${LIBUNWIND_INSTALL_LIBRARY_DIR} COMPONENT unwind ARCHIVE DESTINATION ${LIBUNWIND_INSTALL_LIBRARY_DIR} COMPONENT unwind - RUNTIME DESTINATION bin COMPONENT unwind) + RUNTIME DESTINATION ${LIBUNWIND_INSTALL_RUNTIME_DIR} COMPONENT unwind) endif() if (NOT CMAKE_CONFIGURATION_TYPES AND LIBUNWIND_INSTALL_LIBRARY) -- cgit v1.1