diff options
author | David Faure <faure@kde.org> | 2007-03-19 13:41:24 +0000 |
---|---|---|
committer | David Faure <faure@kde.org> | 2007-03-19 13:41:24 +0000 |
commit | 7187b3101f91daf34441a9903add8d71cd52d4ee (patch) | |
tree | 1bc0d31c92cf8680c8f689dada48285bfa95b298 /modules/KDE4Macros.cmake | |
parent | 9d360e3f7c8d25a3e55584381521f775d703e982 (diff) | |
download | extra-cmake-modules-7187b3101f91daf34441a9903add8d71cd52d4ee.tar.gz extra-cmake-modules-7187b3101f91daf34441a9903add8d71cd52d4ee.tar.bz2 |
shared-mime-info related macros by Pino Toscano (thanks!)
svn path=/trunk/KDE/kdelibs/; revision=644190
Diffstat (limited to 'modules/KDE4Macros.cmake')
-rw-r--r-- | modules/KDE4Macros.cmake | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/modules/KDE4Macros.cmake b/modules/KDE4Macros.cmake index 62cb3770..63beaec8 100644 --- a/modules/KDE4Macros.cmake +++ b/modules/KDE4Macros.cmake @@ -18,6 +18,7 @@ # KDE4_INSTALL_HANDBOOK # KDE4_CREATE_PO_FILES # KDE4_INSTALL_PO_FILES +# KDE4_INSTALL_XDG_MIMETYPES # Copyright (c) 2006, 2007, Alexander Neundorf, <neundorf@kde.org> # Copyright (c) 2006, 2007, Laurent Montel, <montel@kde.org> @@ -924,3 +925,29 @@ macro(KDE4_CREATE_EXPORTS_HEADER _outputFile _libName) # contents have changed. Otherwise we would have a lot of recompiles. configure_file(${KDE4_MODULE_DIR}/kde4exportsheader.h.in ${_outputFile}) endmacro(KDE4_CREATE_EXPORTS_HEADER _outputFile _libName) + + +macro (INSTALL_XDG_MIMETYPES _path ) + + foreach (_current_FILE ${ARGN}) + + install(FILES ${_current_FILE} DESTINATION ${_path}/share/mime/packages) + + install(CODE " +#message(STATUS \"DESTDIR: <\$ENV{DESTDIR}>\") +set(MYFOO \"\$ENV{DESTDIR}\") +#message(STATUS \"MYFOO: <\${MYFOO}>\") +if (NOT MYFOO) + exec_program(update-mime-database ARGS ${_path}/share/mime/) +endif (NOT MYFOO) +") + + endforeach (_current_FILE) + +endmacro (INSTALL_XDG_MIMETYPES) + +macro (KDE4_INSTALL_XDG_MIMETYPES) + + install_xdg_mimetypes(${CMAKE_INSTALL_PREFIX} ${ARGN}) + +endmacro (KDE4_INSTALL_XDG_MIMETYPES) |