Getting Xcode 4 to recompile Qt resources on Build?
-
I'm on the Mac using Xcode. Qt resource files are not being re-compiled when I build the Xcode project, despite the fact that the qt_preprocess.mak file (in the Xcode project's package) already contains:
compiler_rcc_make_all: qrc_megatest.cpp
compiler_rcc_clean:
-$(DEL_FILE) qrc_megatest.cpp
qrc_megatest.cpp: megatest.qrc
/Developer/Tools/Qt/rcc -name megatest megatest.qrc -o qrc_megatest.cppand the Xcode project has a build step to "make" qt_preprocess.mak.
I found however that I can get my resource to recompile by adding a specific build step as one of the Xcode project's build phases:
rcc megatest.qrc -o qrc_megatest.cpp
However, I have to build the project twice to get changes to the resource file to show up in the application. My guess is that this means that megatest.cpp is being compiled into object code prior to rcc rebuilding it.
Questions:
-
Why do I need to add my own build step "rcc megatest.qrc -o qrc_megatest.cpp" when the qt_preprocess.mak file seems to have code that looks like it should handle this already?
-
How can I get resource file changes to show up after the first build, instead of requiring a second build? (I did already try moving the Build Phase both before and after the "Build Sources" build phase. No change.)
-Vern
-