No mime update when cross-compiling
Ignore all ninja generated files
MODIFY
.gitignore
.gitignore
@@ -46,7 +46,7 @@ Testing/
# ninja
.ninja_*
-build.ninja
+*.ninja
# IntelliJ / CLion
.idea/

MODIFY
CMakeLists.txt
CMakeLists.txt
@@ -263,7 +263,7 @@ if(NOT DISABLE_XML)
endif()
# mime types
-if(NOT DISABLE_UPDATE_MIMEDB)
+if(NOT DISABLE_UPDATE_MIMEDB AND NOT CMAKE_CROSSCOMPILING)
find_program(UPDATE_MIME_DATABASE update-mime-database)
endif()

MODIFY
Makefile.am
Makefile.am
@@ -236,8 +236,12 @@ check-local:
install-data-hook:
if ENABLE_UPDATE_MIMEDB
+if CROSS_COMPILING
+ @echo "Cross compiling: Skipping update of mime database"
+else
$(UPDATE_MIME_DATABASE) "$(DESTDIR)$(datadir)/mime"
endif
+endif
uninstall-hook:
rm -f "$(DESTDIR)$(datadir)/mime/application/"*.xml

MODIFY
configure.ac
configure.ac
@@ -19,6 +19,7 @@ AM_PROG_AR
AC_PROG_CXXCPP
AC_PROG_CXX
LT_INIT([win32-dll])
+AM_CONDITIONAL(CROSS_COMPILING,[test "x$cross_compiling" = "xyes"])
# Checks for libraries.
AC_ARG_ENABLE([icu],[AS_HELP_STRING([--disable-icu],[Disable ICU encoding detection (fallback to iconv) [default=no]])])
@@ -33,7 +34,7 @@ AS_IF([test "x$enable_xml" != "xno"],[
# Add mime types
AC_ARG_ENABLE([update-mimedb],[AS_HELP_STRING([--disable-update-mimedb],[Do not run update-mime-database after install [default=no]])])
-AS_IF([test "x$enable_update_mimedb" != "xno"],[
+AS_IF([test "x$enable_update_mimedb" != "xno" && test "x$cross_compiling" = "xno"],[
AC_PATH_PROG(UPDATE_MIME_DATABASE, update-mime-database, no)
AS_IF([test "x$UPDATE_MIME_DATABASE" = "xno"],[
enable_update_mimedb=no

No mime update when cross-compiling
Ignore all ninja generated files