summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPetr Hosek <phosek@chromium.org>2017-11-17 23:25:09 +0000
committerPetr Hosek <phosek@chromium.org>2017-11-17 23:25:09 +0000
commit43600b48fcd9201db390d94ffcce2625c5925f07 (patch)
tree6d95bb6998b14b9c0e0d905f93ed189fe51fe7ab /src
parent3568730f18d72e45c2f2a1bc12e42ee3166d3fcb (diff)
[libcxxabi][CMake] Provide option to disable installing of the library
This is useful in cases where we only build static library and libc++abi.a is combined with libc++.a into a single archive in which case we don't want to have libc++abi.a installed separately. The same option is already provided by libcxx CMake build. Differential Revision: https://reviews.llvm.org/D40194 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@318568 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 23e8c88..32e04c8 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -179,12 +179,14 @@ endif()
# Add a meta-target for both libraries.
add_custom_target(cxxabi DEPENDS ${LIBCXXABI_TARGETS})
-install(TARGETS ${LIBCXXABI_TARGETS}
- LIBRARY DESTINATION ${LIBCXXABI_INSTALL_PREFIX}lib${LIBCXXABI_LIBDIR_SUFFIX} COMPONENT cxxabi
- ARCHIVE DESTINATION ${LIBCXXABI_INSTALL_PREFIX}lib${LIBCXXABI_LIBDIR_SUFFIX} COMPONENT cxxabi
- )
+if (LIBCXXABI_INSTALL_LIBRARY)
+ install(TARGETS ${LIBCXXABI_TARGETS}
+ LIBRARY DESTINATION ${LIBCXXABI_INSTALL_PREFIX}lib${LIBCXXABI_LIBDIR_SUFFIX} COMPONENT cxxabi
+ ARCHIVE DESTINATION ${LIBCXXABI_INSTALL_PREFIX}lib${LIBCXXABI_LIBDIR_SUFFIX} COMPONENT cxxabi
+ )
+endif()
-if (NOT CMAKE_CONFIGURATION_TYPES)
+if (NOT CMAKE_CONFIGURATION_TYPES AND LIBCXXABI_INSTALL_LIBRARY)
add_custom_target(install-cxxabi
DEPENDS cxxabi
COMMAND "${CMAKE_COMMAND}"