forked from OSchip/llvm-project
[libc++] Remove redundant if(LIBCXX_INSTALL_LIBRARY)
The individual LIBCXX_INSTALL_(SHARED|STATIC)_LIBRARY are already dependent on whether LIBCXX_INSTALL_LIBRARY is ON or OFF.
This commit is contained in:
parent
5d74c43511
commit
4bd3d16c2d
|
@ -340,41 +340,38 @@ if (LIBCXX_BUILD_EXTERNAL_THREAD_LIBRARY)
|
|||
target_link_libraries(cxx_external_threads PRIVATE cxx-headers)
|
||||
endif()
|
||||
|
||||
if (LIBCXX_INSTALL_LIBRARY)
|
||||
if (LIBCXX_INSTALL_SHARED_LIBRARY)
|
||||
install(TARGETS cxx_shared
|
||||
ARCHIVE DESTINATION ${LIBCXX_INSTALL_PREFIX}${LIBCXX_INSTALL_LIBRARY_DIR} COMPONENT cxx
|
||||
LIBRARY DESTINATION ${LIBCXX_INSTALL_PREFIX}${LIBCXX_INSTALL_LIBRARY_DIR} COMPONENT cxx
|
||||
RUNTIME DESTINATION ${LIBCXX_INSTALL_PREFIX}bin COMPONENT cxx)
|
||||
endif()
|
||||
|
||||
if (LIBCXX_INSTALL_STATIC_LIBRARY)
|
||||
install(TARGETS cxx_static
|
||||
ARCHIVE DESTINATION ${LIBCXX_INSTALL_PREFIX}${LIBCXX_INSTALL_LIBRARY_DIR} COMPONENT cxx
|
||||
LIBRARY DESTINATION ${LIBCXX_INSTALL_PREFIX}${LIBCXX_INSTALL_LIBRARY_DIR} COMPONENT cxx
|
||||
RUNTIME DESTINATION ${LIBCXX_INSTALL_PREFIX}bin COMPONENT cxx)
|
||||
endif()
|
||||
|
||||
if(LIBCXX_INSTALL_EXPERIMENTAL_LIBRARY)
|
||||
install(TARGETS cxx_experimental
|
||||
LIBRARY DESTINATION ${LIBCXX_INSTALL_PREFIX}${LIBCXX_INSTALL_LIBRARY_DIR} COMPONENT cxx
|
||||
ARCHIVE DESTINATION ${LIBCXX_INSTALL_PREFIX}${LIBCXX_INSTALL_LIBRARY_DIR} COMPONENT cxx
|
||||
RUNTIME DESTINATION ${LIBCXX_INSTALL_PREFIX}bin COMPONENT cxx)
|
||||
endif()
|
||||
|
||||
# NOTE: This install command must go after the cxx install command otherwise
|
||||
# it will not be executed after the library symlinks are installed.
|
||||
if (LIBCXX_ENABLE_SHARED AND LIBCXX_ENABLE_ABI_LINKER_SCRIPT)
|
||||
# Replace the libc++ filename with $<TARGET_LINKER_FILE:cxx>
|
||||
# after we required CMake 3.0.
|
||||
install(FILES "${LIBCXX_LIBRARY_DIR}/libc++${CMAKE_SHARED_LIBRARY_SUFFIX}"
|
||||
DESTINATION ${LIBCXX_INSTALL_PREFIX}${LIBCXX_INSTALL_LIBRARY_DIR}
|
||||
COMPONENT libcxx)
|
||||
endif()
|
||||
if (LIBCXX_INSTALL_SHARED_LIBRARY)
|
||||
install(TARGETS cxx_shared
|
||||
ARCHIVE DESTINATION ${LIBCXX_INSTALL_PREFIX}${LIBCXX_INSTALL_LIBRARY_DIR} COMPONENT cxx
|
||||
LIBRARY DESTINATION ${LIBCXX_INSTALL_PREFIX}${LIBCXX_INSTALL_LIBRARY_DIR} COMPONENT cxx
|
||||
RUNTIME DESTINATION ${LIBCXX_INSTALL_PREFIX}bin COMPONENT cxx)
|
||||
endif()
|
||||
|
||||
if (NOT CMAKE_CONFIGURATION_TYPES AND (LIBCXX_INSTALL_LIBRARY OR
|
||||
LIBCXX_INSTALL_HEADERS))
|
||||
if (LIBCXX_INSTALL_STATIC_LIBRARY)
|
||||
install(TARGETS cxx_static
|
||||
ARCHIVE DESTINATION ${LIBCXX_INSTALL_PREFIX}${LIBCXX_INSTALL_LIBRARY_DIR} COMPONENT cxx
|
||||
LIBRARY DESTINATION ${LIBCXX_INSTALL_PREFIX}${LIBCXX_INSTALL_LIBRARY_DIR} COMPONENT cxx
|
||||
RUNTIME DESTINATION ${LIBCXX_INSTALL_PREFIX}bin COMPONENT cxx)
|
||||
endif()
|
||||
|
||||
if(LIBCXX_INSTALL_EXPERIMENTAL_LIBRARY)
|
||||
install(TARGETS cxx_experimental
|
||||
LIBRARY DESTINATION ${LIBCXX_INSTALL_PREFIX}${LIBCXX_INSTALL_LIBRARY_DIR} COMPONENT cxx
|
||||
ARCHIVE DESTINATION ${LIBCXX_INSTALL_PREFIX}${LIBCXX_INSTALL_LIBRARY_DIR} COMPONENT cxx
|
||||
RUNTIME DESTINATION ${LIBCXX_INSTALL_PREFIX}bin COMPONENT cxx)
|
||||
endif()
|
||||
|
||||
# NOTE: This install command must go after the cxx install command otherwise
|
||||
# it will not be executed after the library symlinks are installed.
|
||||
if (LIBCXX_ENABLE_SHARED AND LIBCXX_ENABLE_ABI_LINKER_SCRIPT)
|
||||
# Replace the libc++ filename with $<TARGET_LINKER_FILE:cxx>
|
||||
# after we required CMake 3.0.
|
||||
install(FILES "${LIBCXX_LIBRARY_DIR}/libc++${CMAKE_SHARED_LIBRARY_SUFFIX}"
|
||||
DESTINATION ${LIBCXX_INSTALL_PREFIX}${LIBCXX_INSTALL_LIBRARY_DIR}
|
||||
COMPONENT libcxx)
|
||||
endif()
|
||||
|
||||
if (NOT CMAKE_CONFIGURATION_TYPES)
|
||||
if(LIBCXX_INSTALL_LIBRARY)
|
||||
set(lib_install_target cxx)
|
||||
endif()
|
||||
|
|
Loading…
Reference in New Issue