diff options
author | Brad King <brad.king@kitware.com> | 2014-02-06 16:10:18 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2014-02-06 16:10:18 (GMT) |
commit | d5c54d0069224000b28ad942fbf84a3de8729970 (patch) | |
tree | 5381416886ef1912e499cef0f5eb883a15916177 /Source | |
parent | 5f7d7bdd67d0b00b726161b235d3719ba4f33d05 (diff) | |
parent | 8f8edeb09bef3065c0a344bfa00f20a843cf1a32 (diff) | |
download | CMake-d5c54d0069224000b28ad942fbf84a3de8729970.zip CMake-d5c54d0069224000b28ad942fbf84a3de8729970.tar.gz CMake-d5c54d0069224000b28ad942fbf84a3de8729970.tar.bz2 |
Merge topic 'fix-Qt-autogen'
8f8edeb0 QtAutogen: Only add source files to the target if AUTORCC is ON.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmQtAutoGenerators.cxx | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx index 7e44c26..ab194c3 100644 --- a/Source/cmQtAutoGenerators.cxx +++ b/Source/cmQtAutoGenerators.cxx @@ -487,19 +487,23 @@ void cmQtAutoGenerators::SetupSourceFiles(cmTarget const* target) } std::string ext = sf->GetExtension(); - if (ext == "qrc" - && !cmSystemTools::IsOn(sf->GetPropertyForUser("SKIP_AUTORCC"))) + + if (target->GetPropertyAsBool("AUTORCC")) { - std::string basename = cmsys::SystemTools:: - GetFilenameWithoutLastExtension(absFile); - - std::string rcc_output_file = makefile->GetCurrentOutputDirectory(); - rcc_output_file += "/qrc_" + basename + ".cpp"; - makefile->AppendProperty("ADDITIONAL_MAKE_CLEAN_FILES", - rcc_output_file.c_str(), false); - cmSourceFile* rccCppSource - = makefile->GetOrCreateSource(rcc_output_file.c_str(), true); - newRccFiles.push_back(rccCppSource); + if (ext == "qrc" + && !cmSystemTools::IsOn(sf->GetPropertyForUser("SKIP_AUTORCC"))) + { + std::string basename = cmsys::SystemTools:: + GetFilenameWithoutLastExtension(absFile); + + std::string rcc_output_file = makefile->GetCurrentOutputDirectory(); + rcc_output_file += "/qrc_" + basename + ".cpp"; + makefile->AppendProperty("ADDITIONAL_MAKE_CLEAN_FILES", + rcc_output_file.c_str(), false); + cmSourceFile* rccCppSource + = makefile->GetOrCreateSource(rcc_output_file.c_str(), true); + newRccFiles.push_back(rccCppSource); + } } if (!generated) |