forked from qt-creator/qt-creator
CMake Build: Use install component Dependencies
Fixes: QTCREATORBUG-23593 Change-Id: If9861a0ee09f2ce12ac093c2fde600a77958723a Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
4
.github/workflows/build_cmake.yml
vendored
4
.github/workflows/build_cmake.yml
vendored
@@ -367,7 +367,9 @@ jobs:
|
||||
|
||||
|
||||
- name: Install Strip
|
||||
run: ${{ steps.cmake_and_ninja.outputs.cmake_dir }}/cmake --install build --prefix instdir --strip
|
||||
run: |
|
||||
${{ steps.cmake_and_ninja.outputs.cmake_dir }}/cmake --install build --prefix instdir --strip
|
||||
${{ steps.cmake_and_ninja.outputs.cmake_dir }}/cmake --install build --prefix instdir --component Dependencies
|
||||
|
||||
- name: Install Devel
|
||||
run: ${{ steps.cmake_and_ninja.outputs.cmake_dir }}/cmake --install build --prefix instdir-dev --component Devel
|
||||
|
||||
@@ -6,10 +6,7 @@
|
||||
#
|
||||
# This way we are sure that all the binaries have been installed before.
|
||||
|
||||
option(DEPLOY_QTC_DEPENDENCIES
|
||||
"Deployment of Qt, Clang, C++ Runtime libraries" ON)
|
||||
|
||||
if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.16 AND DEPLOY_QTC_DEPENDENCIES)
|
||||
if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.16)
|
||||
get_target_property(moc_binary Qt5::moc IMPORTED_LOCATION)
|
||||
get_filename_component(moc_dir "${moc_binary}" DIRECTORY)
|
||||
get_filename_component(QT_BASE_DIR "${moc_dir}/../" ABSOLUTE)
|
||||
@@ -28,6 +25,7 @@ if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.16 AND DEPLOY_QTC_DEPENDENCIES)
|
||||
install(
|
||||
DIRECTORY "${QT_BASE_DIR}/plugins/${plugin}"
|
||||
DESTINATION ${QT_DEST_PLUGIN_PATH}
|
||||
COMPONENT Dependencies
|
||||
${exclusion_mask}
|
||||
)
|
||||
list(APPEND QT_PLUGIN_DIRECTORIES "${QT_DEST_PLUGIN_PATH}/${plugin}")
|
||||
@@ -36,6 +34,7 @@ if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.16 AND DEPLOY_QTC_DEPENDENCIES)
|
||||
install(
|
||||
DIRECTORY "${QT_BASE_DIR}/qml/"
|
||||
DESTINATION ${QT_DEST_QML_PATH}
|
||||
COMPONENT Dependencies
|
||||
PATTERN "qml/*"
|
||||
${exclusion_mask}
|
||||
)
|
||||
@@ -43,7 +42,10 @@ if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.16 AND DEPLOY_QTC_DEPENDENCIES)
|
||||
# Analyze the binaries and install missing dependencies if they are
|
||||
# found the CMAKE_PREFIX_PATH e.g. Qt, Clang
|
||||
configure_file(InstallDependentSharedObjects.cmake.in InstallDependentSharedObjects.cmake @ONLY)
|
||||
install(SCRIPT ${CMAKE_CURRENT_BINARY_DIR}/InstallDependentSharedObjects.cmake)
|
||||
install(
|
||||
SCRIPT ${CMAKE_CURRENT_BINARY_DIR}/InstallDependentSharedObjects.cmake
|
||||
COMPONENT Dependencies
|
||||
)
|
||||
|
||||
if (MSVC)
|
||||
set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP ON)
|
||||
@@ -51,6 +53,7 @@ if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.16 AND DEPLOY_QTC_DEPENDENCIES)
|
||||
|
||||
install(PROGRAMS ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS}
|
||||
DESTINATION ${IDE_APP_PATH}
|
||||
COMPONENT Dependencies
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -1045,6 +1045,7 @@ function(add_qtc_executable name)
|
||||
create_qt_conf(\"${_EXECUTABLE_PATH}\" \"${IDE_LIBRARY_BASE_PATH}/Qt\")
|
||||
endif()
|
||||
"
|
||||
COMPONENT Dependencies
|
||||
)
|
||||
|
||||
endif()
|
||||
|
||||
@@ -178,6 +178,7 @@ foreach(executable clang clang-cl clangd clang-tidy clazy-standalone)
|
||||
install(PROGRAMS
|
||||
"${LLVM_TOOLS_BINARY_DIR}/${executable}${CMAKE_EXECUTABLE_SUFFIX}"
|
||||
DESTINATION "${IDE_LIBEXEC_PATH}/clang/bin"
|
||||
COMPONENT Dependencies
|
||||
)
|
||||
if (IS_SYMLINK "${LLVM_TOOLS_BINARY_DIR}/${executable}${CMAKE_EXECUTABLE_SUFFIX}")
|
||||
file(READ_SYMLINK
|
||||
@@ -185,6 +186,7 @@ foreach(executable clang clang-cl clangd clang-tidy clazy-standalone)
|
||||
install(PROGRAMS
|
||||
"${LLVM_TOOLS_BINARY_DIR}/${real_executable}${CMAKE_EXECUTABLE_SUFFIX}"
|
||||
DESTINATION "${IDE_LIBEXEC_PATH}/clang/bin"
|
||||
COMPONENT Dependencies
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
@@ -192,4 +194,5 @@ endforeach()
|
||||
|
||||
install(DIRECTORY ${LLVM_LIBRARY_DIR}/clang/${CLANG_VERSION}/include
|
||||
DESTINATION "${IDE_LIBEXEC_PATH}/clang/lib/clang/${CLANG_VERSION}"
|
||||
COMPONENT Dependencies
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user