aboutsummaryrefslogtreecommitdiff
path: root/find-modules/FindSharedMimeInfo.cmake
diff options
context:
space:
mode:
authorHarald Sitter <sitter@kde.org>2020-08-07 14:09:51 +0200
committerHarald Sitter <sitter@kde.org>2020-08-07 15:41:23 +0200
commitf3eb33fbd4d16ef567b9e456c6c70052b4673581 (patch)
treed6fe981d9398a2125bdde9967b74038dda7493c4 /find-modules/FindSharedMimeInfo.cmake
parent6a278dff8b70f6ed3453c39a82ba41c97248aadd (diff)
downloadextra-cmake-modules-f3eb33fbd4d16ef567b9e456c6c70052b4673581.tar.gz
extra-cmake-modules-f3eb33fbd4d16ef567b9e456c6c70052b4673581.tar.bz2
invoke update-mime-database with -n
it only updates the database iff there's new files and is specifically meant for post-install invocation. since cmake only installs files when they actually changed this effectively turns repeated cmake --install calls noop as far as database updates are concerned this stops all sources with mimetype definitions from rebuilding the mime database on every install even when nothing changed. it saves literal seconds every install call -n was introduced in 1.4 which is like 6 years old and there are no pratcically relevant distribution versions around with older versions
Diffstat (limited to 'find-modules/FindSharedMimeInfo.cmake')
-rw-r--r--find-modules/FindSharedMimeInfo.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/find-modules/FindSharedMimeInfo.cmake b/find-modules/FindSharedMimeInfo.cmake
index 0969b721..0b8dec9c 100644
--- a/find-modules/FindSharedMimeInfo.cmake
+++ b/find-modules/FindSharedMimeInfo.cmake
@@ -81,7 +81,7 @@ set(DESTDIR_VALUE \"\$ENV{DESTDIR}\")
if (NOT DESTDIR_VALUE)
# under Windows relative paths are used, that's why it runs from CMAKE_INSTALL_PREFIX
message(STATUS \"Updating MIME database at \${CMAKE_INSTALL_PREFIX}/${_xdgmimeDir}\")
- execute_process(COMMAND \"${UPDATE_MIME_DATABASE_EXECUTABLE}\" \"${_xdgmimeDir}\"
+ execute_process(COMMAND \"${UPDATE_MIME_DATABASE_EXECUTABLE}\" -n \"${_xdgmimeDir}\"
WORKING_DIRECTORY \"\${CMAKE_INSTALL_PREFIX}\")
endif (NOT DESTDIR_VALUE)
")