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. Is there a cmake variable like QT_TRANSLATIONS_DIR which holds the real path?
Forum Updated to NodeBB v4.3 + New Features

Is there a cmake variable like QT_TRANSLATIONS_DIR which holds the real path?

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 204 Views
  • 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.
  • S Offline
    S Offline
    Sauntor
    wrote on last edited by
    #1

    I want ship qt library's translations with my app, and write something in CMakeLists.txt as the following for debuging:

    # this just works for debugging
    add_custom_command(
      TARGET myapp
      POST_BUILD
      COMMAND ${LCONVERT}
      ARGS -o "${PROJECT_BINARY_DIR}/qt.qm"
        "${QT_TRANSLATIONS_DIR}/*.qm"
      )
    
    # this works both for debugging and release
    qt_generate_deploy_app_script(
        TARGET myapp
        OUTPUT_SCRIPT deploy_script
    #    NO_UNSUPPORTED_PLATFORM_ERROR
    )
    

    But, there is no such a variable named QT_TRANSLATIONS_DIR!
    Although, there is a variable named QT6_INSTALL_TRANSLATIONS, but it is not set correctly(for app developer)!

    Help!!

    Christian EhrlicherC 1 Reply Last reply
    0
    • S Sauntor

      I want ship qt library's translations with my app, and write something in CMakeLists.txt as the following for debuging:

      # this just works for debugging
      add_custom_command(
        TARGET myapp
        POST_BUILD
        COMMAND ${LCONVERT}
        ARGS -o "${PROJECT_BINARY_DIR}/qt.qm"
          "${QT_TRANSLATIONS_DIR}/*.qm"
        )
      
      # this works both for debugging and release
      qt_generate_deploy_app_script(
          TARGET myapp
          OUTPUT_SCRIPT deploy_script
      #    NO_UNSUPPORTED_PLATFORM_ERROR
      )
      

      But, there is no such a variable named QT_TRANSLATIONS_DIR!
      Although, there is a variable named QT6_INSTALL_TRANSLATIONS, but it is not set correctly(for app developer)!

      Help!!

      Christian EhrlicherC Offline
      Christian EhrlicherC Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #2

      You can install your translation in whatever location you want.

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      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