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. Detect modified files during qmake
QtWS25 Last Chance

Detect modified files during qmake

Scheduled Pinned Locked Moved Unsolved General and Desktop
qmakeqmake makefileqmake-qt5qt5.5system command
3 Posts 2 Posters 1.5k 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.
  • O Offline
    O Offline
    onurA
    wrote on 2 Mar 2016, 12:27 last edited by
    #1

    How does qt detect if the build is necessary or not, e.g. if a source file or in my case a resource file (.qrc) was modified after the last build? Is there a flag for each file?
    What I exactly want to do is, to send a system command for resource compilation by adding this to the .pro file:
    system(rcc -binary -no-compress resource.qrc -o resource.rcc)
    And I want to do it only if the resource.qrc file modified after the last qmake. Is that possible and how?

    Final version should be: if(resource_modified) {COMPILE RESOURCE}

    1 Reply Last reply
    0
    • J Offline
      J Offline
      jsulm
      Lifetime Qt Champion
      wrote on 2 Mar 2016, 13:30 last edited by
      #2

      For source files (c/c++) it is not the job for qmake - this is done by make.
      For built in resource files it is probably the same - make detects whether the resource file was changed or not.

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      O 1 Reply Last reply 3 Mar 2016, 10:03
      0
      • J jsulm
        2 Mar 2016, 13:30

        For source files (c/c++) it is not the job for qmake - this is done by make.
        For built in resource files it is probably the same - make detects whether the resource file was changed or not.

        O Offline
        O Offline
        onurA
        wrote on 3 Mar 2016, 10:03 last edited by
        #3

        @jsulm
        I need it for the rcc command. Whenever I run rcc in terminal, the binary output is re-generated, although the .qrc is the same.

        Is there a way to check it in qmake for example? Like a flag?
        Thanks in advance!

        1 Reply Last reply
        0

        1/3

        2 Mar 2016, 12:27

        • Login

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