CMake: install the metatypes inside Qt's own arch-specific data dir
We don't want it in /lib64/metatypes, but instead /lib64/qt6/metatypes Pick-to: 6.4 Change-Id: Id8e48e8f498c4a029619fffd17293602d7fd8bd8 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
This commit is contained in:
parent
ee2dbcada8
commit
4234ce12dc
@ -755,7 +755,7 @@ set(QT_LIBINFIX \"${QT_LIBINFIX}\")")
|
||||
if (NOT target_type STREQUAL "INTERFACE_LIBRARY")
|
||||
set(args "")
|
||||
if(QT_WILL_INSTALL)
|
||||
set(metatypes_install_dir "${INSTALL_LIBDIR}/metatypes")
|
||||
set(metatypes_install_dir "${INSTALL_ARCHDATADIR}/metatypes")
|
||||
list(APPEND args
|
||||
__QT_INTERNAL_INSTALL __QT_INTERNAL_INSTALL_DIR "${metatypes_install_dir}")
|
||||
endif()
|
||||
|
@ -46,7 +46,7 @@ moc_collect_json.name = Collect moc JSON output into central file
|
||||
|
||||
install_metatypes {
|
||||
do_install_metatypes.CONFIG += no_check_exist
|
||||
do_install_metatypes.path = $$[QT_INSTALL_LIBS]/metatypes
|
||||
do_install_metatypes.path = $$[QT_INSTALL_ARCHDATA]/metatypes
|
||||
do_install_metatypes.files = $$OUT_PWD/$$MOC_COLLECT_JSON_OUTPUT
|
||||
prefix_build {
|
||||
load(qt_build_paths)
|
||||
|
@ -376,7 +376,7 @@ set_source_files_properties(${qobject_moc_files} PROPERTIES HEADER_FILE_ONLY ON)
|
||||
set(core_metatype_args MANUAL_MOC_JSON_FILES ${core_qobject_metatypes_json_list})
|
||||
|
||||
if(QT_WILL_INSTALL)
|
||||
set(metatypes_install_dir ${INSTALL_LIBDIR}/metatypes)
|
||||
set(metatypes_install_dir ${INSTALL_ARCHDATADIR}/metatypes)
|
||||
list(APPEND core_metatype_args
|
||||
__QT_INTERNAL_INSTALL __QT_INTERNAL_INSTALL_DIR "${metatypes_install_dir}")
|
||||
endif()
|
||||
|
@ -900,7 +900,7 @@ function(qt6_extract_metatypes target)
|
||||
# TODO: Move this into a separate internal function, so it doesn't pollute the public one.
|
||||
# Location where to install the metatypes file. Only used if
|
||||
# __QT_INTERNAL_INSTALL is given. It defaults to the
|
||||
# ${CMAKE_INSTALL_PREFIX}/${INSTALL_LIBDIR}/metatypes directory.
|
||||
# ${CMAKE_INSTALL_PREFIX}/${INSTALL_ARCHDATADIR}/metatypes directory.
|
||||
# Executable metatypes files are never installed.
|
||||
__QT_INTERNAL_INSTALL_DIR
|
||||
|
||||
@ -1140,10 +1140,11 @@ function(qt6_extract_metatypes target)
|
||||
|
||||
# Automatically fill default install args when not specified.
|
||||
if(NOT arg___QT_INTERNAL_INSTALL_DIR)
|
||||
# INSTALL_LIBDIR is not set when QtBuildInternals is not loaded (when not doing a Qt build).
|
||||
# Default to a hardcoded location for user projects.
|
||||
if(INSTALL_LIBDIR)
|
||||
set(install_dir "${INSTALL_LIBDIR}/metatypes")
|
||||
# INSTALL_ARCHDATADIR is not set when QtBuildInternals is not loaded
|
||||
# (when not doing a Qt build). Default to a hardcoded location for user
|
||||
# projects (will likely be wrong).
|
||||
if(INSTALL_ARCHDATADIR)
|
||||
set(install_dir "${INSTALL_ARCHDATADIR}/metatypes")
|
||||
else()
|
||||
set(install_dir "lib/metatypes")
|
||||
endif()
|
||||
|
Loading…
Reference in New Issue
Block a user