cmake: fix QET_MIME_PACKAGE_PATH escaping CMAKE_INSTALL_PREFIX

QET_MIME_PACKAGE_PATH was "../share/mime/packages/", a path relative
to CMAKE_INSTALL_PREFIX. This only worked by accident with the old
default prefix (/usr/local -> ../share resolves to /usr/share/mime,
the conventional system location regardless of app prefix).

With -DCMAKE_INSTALL_PREFIX=/usr (as used by Debian/Ubuntu packaging),
the same "../share" escapes /usr entirely, landing at /share/mime
instead of /usr/share/mime, which breaks dh_install (file not found
under usr/) and would silently install the mime package definition
outside any path desktop environments actually scan.

Drop the "../" so the mime package path stays under the install
prefix, matching standard practice (/usr/share/mime/packages or
/usr/local/share/mime/packages).
This commit is contained in:
Laurent Trinques
2026-08-15 16:42:10 +02:00
parent afb7442e8a
commit ddbd1d8d75
+1 -1
View File
@@ -28,7 +28,7 @@ if(UNIX AND NOT APPLE)
set(QET_LANG_PATH "share/qelectrotech/lang/") set(QET_LANG_PATH "share/qelectrotech/lang/")
set(QET_EXAMPLES_PATH "share/qelectrotech/examples/") set(QET_EXAMPLES_PATH "share/qelectrotech/examples/")
set(QET_LICENSE_PATH "doc/qelectrotech/") set(QET_LICENSE_PATH "doc/qelectrotech/")
set(QET_MIME_PACKAGE_PATH "../share/mime/packages/") set(QET_MIME_PACKAGE_PATH "share/mime/packages/")
set(QET_DESKTOP_PATH "share/applications/") set(QET_DESKTOP_PATH "share/applications/")
set(QET_ICONS_PATH "share/icons/hicolor/") set(QET_ICONS_PATH "share/icons/hicolor/")
set(QET_MAN_PATH "man/") set(QET_MAN_PATH "man/")