Reputation: 10495
I have a large-ish Qt project that has multiple subprojects.
One of the sub-projects is intentionally unbuildable, and I don't want QtCreator to try to build it. I still want all its source files visible in the project tree, however.
How can I prevent a project from getting built?
Is there a TEMPLATE = NONE or TARGET = PLZ_DONT_BUILD?
Upvotes: 2
Views: 375
Reputation: 10495
The hacky solution I've come up with is wrapping all my source files with:
DisableBuild {
SOURCES = DummyMain.cpp
} else {
SOURCES = main.cpp \
...many other files...
} #...at the bottom of the .pro file.
DummyMain.cpp just contains an empty int main() function, so the compiler doesn't complain about empty entry points.
If there is a better solution, I'd like to hear it!
Upvotes: 1