diff options
author | Christophe Giboudeaux <christophe@krop.fr> | 2020-01-15 23:01:16 +0100 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2020-01-31 10:09:39 +0000 |
commit | 5fc2882ac5062ec5a8b6f3da626d4d767473c16b (patch) | |
tree | c2402b3f8d367decbd96459ef2def6b58f475b6f /CMakeLists.txt | |
parent | 2ed9aeb68755c92b810e20a37f484d32987d30a3 (diff) |
Add INSTALL_MKSPECSDIR to the install locations
Linux distributions may want to install mkspecs files into a
different subdir in order to make Qt6 co-installable with
older versions.
Contributes to QTBUG-81289
Change-Id: Ie4a64370d742948d5ca4f2eaed6ea550d2676707
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Christophe Giboudeaux <christophe@krop.fr>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index d7874e891a..cb41b25406 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -79,11 +79,16 @@ if(NOT QT_BUILD_STANDALONE_TESTS) endif() # As long as we use the mkspecs (for qplatformdefs.h), we need to always # install it, especially when cross-compiling. - set(mkspecs_install_dir "${INSTALL_DATADIR}") + set(mkspecs_install_dir "${INSTALL_MKSPECSDIR}") qt_path_join(mkspecs_install_dir ${QT_INSTALL_DIR} ${mkspecs_install_dir}) - qt_copy_or_install(DIRECTORY "${PROJECT_SOURCE_DIR}/mkspecs" - DESTINATION ${mkspecs_install_dir}) + file(GLOB mkspecs_subdirs + LIST_DIRECTORIES TRUE + "${PROJECT_SOURCE_DIR}/mkspecs/*") + foreach(directory IN LISTS mkspecs_subdirs) + qt_copy_or_install(DIRECTORY "${directory}" + DESTINATION ${mkspecs_install_dir}) + endforeach() endif() qt_build_repo_end() |