diff options
author | Leander Beernaert <leander.beernaert@qt.io> | 2020-03-11 11:07:02 +0100 |
---|---|---|
committer | Leander Beernaert <leander.beernaert@qt.io> | 2020-03-11 14:47:04 +0100 |
commit | c4763e397d1b1d95479de68944956522607e2a18 (patch) | |
tree | a7106590873cfb0aae3ebd0abcd716f6d59de1c2 /CMakeLists.txt | |
parent | 3c85440b16e2883a7e359f21b95100d868270d4f (diff) |
CMake: Fix mkspec install commands
If there is a file present in the globbed mkspecs_subdirs file list we
run into an invalid argument error for the install(DIRECTORY) command.
Change-Id: I0fe61a8f0a863854f55cf62a87417bcaec1d2c29
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 6c670e3eb8..7027597bd8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -86,9 +86,14 @@ if(NOT QT_BUILD_STANDALONE_TESTS) 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}) + foreach(entry IN LISTS mkspecs_subdirs) + if (IS_DIRECTORY ${entry}) + qt_copy_or_install(DIRECTORY "${entry}" + DESTINATION ${mkspecs_install_dir}) + else() + qt_copy_or_install(FILES "${entry}" + DESTINATION ${mkspecs_install_dir}) + endif() endforeach() endif() |