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. How to reference generated files in a QRC file?
Forum Updated to NodeBB v4.3 + New Features

How to reference generated files in a QRC file?

Scheduled Pinned Locked Moved Solved General and Desktop
2 Posts 1 Posters 705 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.
  • A Offline
    A Offline
    agarny
    wrote on last edited by
    #1

    Hi,

    I was wondering whether someone would know how to 'properly' reference files that get automatically generated at build time?

    What I mean is that I, for example, have some language files (.qm files) that get generated and that I want to be able to reference in a QRC file.

    Right now, such a QRC file would look like:

    <RCC>
        <qresource prefix="/">
            ...
            <file alias="my_qm_file">build/my_qm_file.qm</file>
            ...
        </qresource>
    </RCC>
    

    This particular file would sit in the root folder of my Qt project, project that would effectively be built (using CMake) in the build folder, hence I currently reference build in my QRC file.

    However, a colleague of mine needs to build several versions of my project and would therefore like to be able to build my project in say my_build, my_other_build, etc.

    So, when it comes to my QRC file, how can I make sure that the build system does indeed look for my_build/my_qm_file.qm, my_other_build/my_qm_file.qm, etc. and not always build/my_qm_file.qm?

    Cheers, Alan.

    1 Reply Last reply
    0
    • A Offline
      A Offline
      agarny
      wrote on last edited by
      #2

      Ok, my colleague suggested using CMake's CONFIGURE_FILE and it's indeed working fine that way.

      1 Reply Last reply
      1

      • Login

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