Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Makefile target does not work
Qt 6.11 is out! See what's new in the release blog

Makefile target does not work

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 659 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • rrr_rrr_rrrR Offline
    rrr_rrr_rrrR Offline
    rrr_rrr_rrr
    wrote on last edited by
    #1

    Hello,

    I need to get .qm files from .ts.
    For this I am have added QMAKE_EXTRA_COMPILERS block to my .pro file:

    ***TRANSLATIONS +=
    localization/tr_en_US.ts
    localization/tr_ru_RU.ts
    localization/tr_fr_FR.ts

    isEmpty(QMAKE_LRELEASE) {
    win32: QMAKE_LRELEASE = $$[QT_INSTALL_BINS]\lrelease.exe
    else: QMAKE_LRELEASE = $$[QT_INSTALL_BINS]/lrelease
    }

    localization.input = TRANSLATIONS
    localization.output = ${QMAKE_FILE_BASE}.qm
    localization.commands = $$QMAKE_LRELEASE -compress $$QMAKE_FILE_IN -qm $$QMAKE_FILE_PATH/$$QMAKE_FILE_OUT
    localization.CONFIG += no_link
    QMAKE_EXTRA_COMPILERS += localization***

    And after qmake I see the appropriate lines in Makefile:

    *compiler_localization_make_all: tr_en_US.qm tr_ru_RU.qm tr_fr_FR.qm
    compiler_localization_clean:
    ▸···-$(DEL_FILE) tr_en_US.qm tr_ru_RU.qm tr_fr_FR.qm
    tr_en_US.qm: /home/iva/git_repo/hmi_psa_ivi2020/PSA/HMI/localization/tr_en_US.ts
    ▸···/home/iva/Qt5.5.1/5.5/gcc_64/bin/lrelease -compress /home/iva/git_repo/hmi_psa_ivi2020/PSA/HMI/localization/tr_en_US.ts -qm /home/iva/git_repo/hmi_psa_ivi2020/PSA/HMI/localization/tr_en_US.qm

    tr_ru_RU.qm: /home/iva/git_repo/hmi_psa_ivi2020/PSA/HMI/localization/tr_ru_RU.ts
    ▸···/home/iva/Qt5.5.1/5.5/gcc_64/bin/lrelease -compress /home/iva/git_repo/hmi_psa_ivi2020/PSA/HMI/localization/tr_ru_RU.ts -qm /home/iva/git_repo/hmi_psa_ivi2020/PSA/HMI/localization/tr_ru_RU.qm

    tr_fr_FR.qm: /home/iva/git_repo/hmi_psa_ivi2020/PSA/HMI/localization/tr_fr_FR.ts
    ▸···/home/iva/Qt5.5.1/5.5/gcc_64/bin/lrelease -compress /home/iva/git_repo/hmi_psa_ivi2020/PSA/HMI/localization/tr_fr_FR.ts -qm /home/iva/git_repo/hmi_psa_ivi2020/PSA/HMI/localization/tr_fr_FR.qm*

    But when I build the project I do not get .qm files.

    What is in correct in my settings in .pro file? Or may be I need some additional settings for successful getting of .qm files?

    I was trying to organize the same moment via INSTALLS but QMAKE_FILE_IN, QMAKE_FILE_BASE ets variables are empty at the building moment

    Thanks in advance

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      This wiki article might get you on track.

      Hope it helps

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved