Skip to content

Fix GNUInstallDirs variable concatenations in CMake

  set(LOMIRI-CLOCK_APP_DIR "${CMAKE_INSTALL_DATADIR}/${APP_HARDCODE}")
# [...]
  set(ICON ${CMAKE_INSTALL_PREFIX}/${LOMIRI-CLOCK_APP_DIR}/${ICON_FILE})

CMAKE_INSTALL_*DIR variables may not be assumed to be relative, they may be absolute & outside of CMAKE_INSTALL_PREFIX. CMAKE_INSTALL_FULL_*DIR must be used to get a guaranteed-absolute version of such variables.

Also fixes a define being passed to C++ code. I can't imagine how -DGETTEXT_LOCALEDIR="share/locale" could work well in

    QString appDir = QString::fromLocal8Bit(getenv("APP_DIR"));
    QString localePath = QStringLiteral(GETTEXT_LOCALEDIR);
    if (QDir::isAbsolutePath (appDir)) {
        localePath = QDir(appDir).filePath(QStringLiteral("share/locale"));
    }   
    bindtextdomain(GETTEXT_PACKAGE, localePath.toUtf8());

when APP_DIR wasn't set.

Merge request reports

Loading