summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kio/CMakeLists.txt12
-rw-r--r--kio/Makefile.am7
2 files changed, 17 insertions, 2 deletions
diff --git a/kio/CMakeLists.txt b/kio/CMakeLists.txt
index ae7759747..2e84efcd8 100644
--- a/kio/CMakeLists.txt
+++ b/kio/CMakeLists.txt
@@ -35,7 +35,17 @@ link_directories(
##### other data ################################
-install( FILES kio.magic DESTINATION ${CONFIG_INSTALL_DIR}/magic )
+add_custom_command(
+ OUTPUT kio.magic.mgc
+ COMMAND file -C -m ${CMAKE_CURRENT_SOURCE_DIR}/kio.magic
+)
+
+add_custom_target(
+ kio_magic_mgc
+ ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/kio.magic.mgc
+)
+
+install( FILES kio.magic ${CMAKE_CURRENT_BINARY_DIR}/kio.magic.mgc DESTINATION ${CONFIG_INSTALL_DIR}/magic )
install( FILES
application.desktop kurifilterplugin.desktop
diff --git a/kio/Makefile.am b/kio/Makefile.am
index 05d9a72b1..e5502e8b3 100644
--- a/kio/Makefile.am
+++ b/kio/Makefile.am
@@ -35,7 +35,7 @@ libkio_la_LIBADD = kssl/libkssl.la kio/libkiocore.la \
$(LIBZ) $(LIBFAM) $(LIBVOLMGT) $(ACL_LIBS) $(LIB_QT) $(LIB_KDECORE) $(top_builddir)/dcop/libDCOP.la $(LIB_X11)
magicdir = $(kde_confdir)/magic
-magic_DATA = kio.magic
+magic_DATA = kio.magic kio.magic.mgc
kde_servicetypes_DATA = application.desktop kurifilterplugin.desktop \
kcomprfilter.desktop kscan.desktop kdatatool.desktop \
@@ -64,6 +64,11 @@ messages:
$(XGETTEXT) `find . ../kioslave -name "*.cpp" -o -name "*.cc" -o -name "*.h"` -o $(podir)/kio.pot
rm -f rc.cpp
+SUFFIXES = .magic .magic.mgc
+
+.magic.magic.mgc:
+ (cd `dirname $@` && file -C -m $<)
+
DOXYGEN_REFERENCES = kdecore kdefx kjs dcop kdeui kio/kio kio/kfile
DOXYGEN_EXCLUDE = kssl/kssl
include ../admin/Doxyfile.am