diff options
author | Brad King <brad.king@kitware.com> | 2015-10-29 12:42:22 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2015-10-29 12:42:22 (GMT) |
commit | b5d94065c07a3ba6db29297e55b0e01ba0ef1f9d (patch) | |
tree | 5fde812033923f119504071d0560ff98b4b21b5d /Source/cmQtAutoGeneratorInitializer.cxx | |
parent | e14709e5a5379f0a6fa2434551211b66561ad540 (diff) | |
parent | e78fcc6329483c99e61cebffbe5d82b67a3361ae (diff) | |
download | CMake-b5d94065c07a3ba6db29297e55b0e01ba0ef1f9d.zip CMake-b5d94065c07a3ba6db29297e55b0e01ba0ef1f9d.tar.gz CMake-b5d94065c07a3ba6db29297e55b0e01ba0ef1f9d.tar.bz2 |
Merge topic 'autorcc-qt-5.1-compat'
e78fcc63 QtAutogen: Fix rcc invocation for Qt 5.0 and 5.1 (#15644)
Diffstat (limited to 'Source/cmQtAutoGeneratorInitializer.cxx')
-rw-r--r-- | Source/cmQtAutoGeneratorInitializer.cxx | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/Source/cmQtAutoGeneratorInitializer.cxx b/Source/cmQtAutoGeneratorInitializer.cxx index ef146cb..08caea3 100644 --- a/Source/cmQtAutoGeneratorInitializer.cxx +++ b/Source/cmQtAutoGeneratorInitializer.cxx @@ -490,11 +490,30 @@ static std::string ListQt5RccInputs(cmSourceFile* sf, { std::string rccCommand = GetRccExecutable(target); + + bool hasDashDashList = false; + { + std::vector<std::string> command; + command.push_back(rccCommand); + command.push_back("--help"); + std::string rccStdOut; + std::string rccStdErr; + int retVal = 0; + bool result = cmSystemTools::RunSingleCommand( + command, &rccStdOut, &rccStdErr, + &retVal, 0, cmSystemTools::OUTPUT_NONE); + if (result && retVal == 0 && + rccStdOut.find("--list") != std::string::npos) + { + hasDashDashList = true; + } + } + std::vector<std::string> qrcEntries; std::vector<std::string> command; command.push_back(rccCommand); - command.push_back("--list"); + command.push_back(hasDashDashList? "--list" : "-list"); std::string absFile = cmsys::SystemTools::GetRealPath( sf->GetFullPath()); |