diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2022-11-19 22:08:42 -0800 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@intel.com> | 2022-11-28 10:58:13 -0800 |
commit | 4234ce12dc819b9ca76c8dc4c251f5bd4fe0bc9c (patch) | |
tree | 373acd2e672747fa651b0adf1b0f63dba949ffca /src | |
parent | ee2dbcada81f5220a05414d7bf9d5eeebdda8972 (diff) |
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>
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/CMakeLists.txt | 2 | ||||
-rw-r--r-- | src/corelib/Qt6CoreMacros.cmake | 11 |
2 files changed, 7 insertions, 6 deletions
diff --git a/src/corelib/CMakeLists.txt b/src/corelib/CMakeLists.txt index 9d7e1ecbdd..e8be8fab98 100644 --- a/src/corelib/CMakeLists.txt +++ b/src/corelib/CMakeLists.txt @@ -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() diff --git a/src/corelib/Qt6CoreMacros.cmake b/src/corelib/Qt6CoreMacros.cmake index 19a75917a4..baf8fcb578 100644 --- a/src/corelib/Qt6CoreMacros.cmake +++ b/src/corelib/Qt6CoreMacros.cmake @@ -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() |