blob: 47c8c696f0d1d889bbfb1d0531c2ed7ede3f5400 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
# Deployment of Qt, Clang, C++ Runtime libraries is being done in this script.
#
# It should be included as a subdirectory as last because of CMake's
# cmake_install.cmake script behviour of including subdirectories at the end
# of the script, not respecting the order of install commands from CMakeLists.txt
#
# This way we are sure that all the binaries have been installed before.
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)
if (MSVC AND NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
set(exclusion_mask PATTERN "*d.dll" EXCLUDE)
endif()
foreach(plugin
assetimporters designer iconengines imageformats platforminputcontexts
platforms platformthemes printsupport qmltooling sqldrivers styles
xcbglintegrations)
if(NOT EXISTS "${QT_BASE_DIR}/plugins/${plugin}")
continue()
endif()
install(
DIRECTORY "${QT_BASE_DIR}/plugins/${plugin}"
DESTINATION ${QT_DEST_PLUGIN_PATH}
COMPONENT Dependencies
EXCLUDE_FROM_ALL
${exclusion_mask}
)
list(APPEND QT_PLUGIN_DIRECTORIES "${QT_DEST_PLUGIN_PATH}/${plugin}")
endforeach()
install(
DIRECTORY "${QT_BASE_DIR}/qml/"
DESTINATION ${QT_DEST_QML_PATH}
COMPONENT Dependencies
EXCLUDE_FROM_ALL
PATTERN "qml/*"
${exclusion_mask}
)
# 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
COMPONENT Dependencies
EXCLUDE_FROM_ALL
)
if (MSVC)
set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP ON)
include(InstallRequiredsystemLibraries)
# For Qt Creator
install(PROGRAMS ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS}
DESTINATION ${IDE_APP_PATH}
COMPONENT Dependencies
EXCLUDE_FROM_ALL
)
# For qtcreatorcdbext
set(ArchSuffix 32)
if (CMAKE_SIZEOF_VOID_P EQUAL 8)
set(ArchSuffix 64)
endif()
install(PROGRAMS ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS}
DESTINATION lib/qtcreatorcdbext${ArchSuffix}
COMPONENT Dependencies
EXCLUDE_FROM_ALL
)
endif()
endif()
|