summaryrefslogtreecommitdiff
path: root/src/share/3rdparty/CMakeLists.txt
diff options
context:
space:
mode:
authorAlexis Murzeau <amubtdx@gmail.com>2020-04-29 22:09:45 +0200
committerAlexis Murzeau <amubtdx@gmail.com>2020-05-11 22:36:30 +0000
commita9aa5612345bcfae9a5562e135dec9de8c3b8a8f (patch)
treec668c7584982785c8eca076e759c9c89ea6b3236 /src/share/3rdparty/CMakeLists.txt
parent95d9eafc8a6bbd21f0bcde0274d2ec100d6f386b (diff)
downloadqt-creator-a9aa5612345bcfae9a5562e135dec9de8c3b8a8f.tar.gz
CMake: copy clang and resource files only if necessary
Uses a timestamp file in the build directory to detect when the input changes using DEPENDS from add_custom_command. Total copied files size sum up to more than 260 MB. This was copied at every incremental build, even if nothing changed. This leads to faster build, especially when the copied files are not cached in RAM or when not using a SSD. Change-Id: I3a0b691b961e1d8591068bacf40ae2467c8637cf Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Diffstat (limited to 'src/share/3rdparty/CMakeLists.txt')
-rw-r--r--src/share/3rdparty/CMakeLists.txt10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/share/3rdparty/CMakeLists.txt b/src/share/3rdparty/CMakeLists.txt
index ede2157426..2168701e06 100644
--- a/src/share/3rdparty/CMakeLists.txt
+++ b/src/share/3rdparty/CMakeLists.txt
@@ -3,11 +3,7 @@ install(
DESTINATION "${IDE_DATA_PATH}"
)
-add_custom_target(copy_fonts_to_builddir ALL VERBATIM)
-add_custom_command(TARGET copy_fonts_to_builddir POST_BUILD
- COMMAND "${CMAKE_COMMAND}" -E copy_directory fonts
- "${PROJECT_BINARY_DIR}/${IDE_DATA_PATH}/fonts"
- WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
- COMMENT Copy files into build directory
- VERBATIM
+qtc_copy_to_builddir(copy_fonts_to_builddir
+ DIRECTORIES fonts
+ DESTINATION "${IDE_DATA_PATH}/fonts"
)