[cmake-developers] [CMake 0016103]: AUTORCC will not regenerate qrc when a resource changes

Mantis Bug Tracker mantis at public.kitware.com
Fri May 13 06:36:30 EDT 2016


The following issue has been SUBMITTED. 
====================================================================== 
https://cmake.org/Bug/view.php?id=16103 
====================================================================== 
Reported By:                OregonGhost
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   16103
Category:                   CMake
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2016-05-13 06:36 EDT
Last Modified:              2016-05-13 06:36 EDT
====================================================================== 
Summary:                    AUTORCC will not regenerate qrc when a resource
changes
Description: 
I am using CMake with Visual C++ (2010 & 2013) and Qt 5.4. My primary target has
a qrc file listed as source. AUTOMOC, AUTORCC and AUTOUIC are ON.

When the qrc file itself is changed, rcc is called.
When a resource the qrc file links to is changed, rcc is not called.

As a result, CMake happily builds an executable with old resources, unless the
qrc has been changed.

According to https://cmake.org/Bug/view.php?id=15074, this should work for some
time now. It did not for me with CMake 3.2, which I was using until recently,
nor with 3.5.2, which I have currently installed.

Steps to Reproduce: 
Relevant portions of CMakeLists.txt:

set(CMAKE_AUTORCC ON)
...
find_package(Qt5Core REQUIRED)
...
set( my_sources ... my.qrc )
...
add_executable( my WIN32 ... ${my_sources} )

Example from my.qrc:

<RCC>
    <qresource prefix="/Bullets">
        <file alias="Blue">Resources/Tags/BulletBlue.png</file>
    </qresource>
</RCC>

=> Change BulletBlue.png and qrc_my.cpp is NOT regenerated, nor recompiled.

Additional Information: 
Running on Windows 10, currently with Visual C++ 2013, but the problem also
happens on Windows 7 and with Visual C++ 2010.
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2016-05-13 06:36 OregonGhost    New Issue                                    
======================================================================



More information about the cmake-developers mailing list