summaryrefslogtreecommitdiffstats
path: root/Source/cmQtAutoRcc.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmQtAutoRcc.cxx')
-rw-r--r--Source/cmQtAutoRcc.cxx44
1 files changed, 35 insertions, 9 deletions
diff --git a/Source/cmQtAutoRcc.cxx b/Source/cmQtAutoRcc.cxx
index 414a692..576f611 100644
--- a/Source/cmQtAutoRcc.cxx
+++ b/Source/cmQtAutoRcc.cxx
@@ -14,7 +14,6 @@
#include "cmFileLockResult.h"
#include "cmFileTime.h"
#include "cmProcessOutput.h"
-#include "cmQtAutoGen.h"
#include "cmQtAutoGenerator.h"
#include "cmStringAlgorithms.h"
#include "cmSystemTools.h"
@@ -36,6 +35,11 @@ public:
private:
// -- Utility
bool IsMultiConfig() const { return this->MultiConfig_; }
+ std::string const& GetGenerator() const { return this->Generator_; }
+ bool IsXcode() const
+ {
+ return this->GetGenerator().find("Xcode") != std::string::npos;
+ }
std::string MultiConfigOutput() const;
// -- Abstract processing interface
@@ -54,6 +58,8 @@ private:
// -- Config settings
bool MultiConfig_ = false;
+ bool CrossConfig_ = false;
+ std::string Generator_;
// -- Directories
std::string AutogenBuildDir_;
std::string IncludeDir_;
@@ -93,26 +99,45 @@ bool cmQtAutoRccT::InitFromInfo(InfoT const& info)
{
// -- Required settings
if (!info.GetBool("MULTI_CONFIG", this->MultiConfig_, true) ||
+ !info.GetString("GENERATOR", this->Generator_, true) ||
+ !info.GetBool("CROSS_CONFIG", this->CrossConfig_, true) ||
!info.GetString("BUILD_DIR", this->AutogenBuildDir_, true) ||
!info.GetStringConfig("INCLUDE_DIR", this->IncludeDir_, true) ||
- !info.GetString("RCC_EXECUTABLE", this->RccExecutable_, true) ||
- !info.GetArray("RCC_LIST_OPTIONS", this->RccListOptions_, false) ||
+ !info.GetArrayConfig("RCC_LIST_OPTIONS", this->RccListOptions_, false) ||
!info.GetString("LOCK_FILE", this->LockFile_, true) ||
!info.GetStringConfig("SETTINGS_FILE", this->SettingsFile_, true) ||
!info.GetString("SOURCE", this->QrcFile_, true) ||
!info.GetString("OUTPUT_CHECKSUM", this->RccPathChecksum_, true) ||
!info.GetString("OUTPUT_NAME", this->RccFileName_, true) ||
!info.GetArray("OPTIONS", this->Options_, false) ||
- !info.GetArray("INPUTS", this->Inputs_, false)) {
+ !info.GetArrayConfig("INPUTS", this->Inputs_, false)) {
return false;
}
+ if (this->CrossConfig_) {
+ std::string const rccExecutableWithConfig =
+ "RCC_EXECUTABLE_" + this->ExecutableConfig();
+ if (!info.GetString(rccExecutableWithConfig, this->RccExecutable_, true)) {
+ return false;
+ }
+ } else {
+ if (!info.GetStringConfig("RCC_EXECUTABLE", this->RccExecutable_, true)) {
+ return false;
+ }
+ }
+
// -- Derive information
this->QrcFileName_ = cmSystemTools::GetFilenameName(this->QrcFile_);
this->QrcFileDir_ = cmSystemTools::GetFilenamePath(this->QrcFile_);
- this->RccFilePublic_ =
- cmStrCat(this->AutogenBuildDir_, '/', this->RccPathChecksum_, '/',
- this->RccFileName_);
+ if (IsMultiConfig() && !this->IsXcode()) {
+ this->RccFilePublic_ =
+ cmStrCat(this->AutogenBuildDir_, '/', this->RccPathChecksum_, "_",
+ this->InfoConfig(), '/', this->RccFileName_);
+ } else {
+ this->RccFilePublic_ =
+ cmStrCat(this->AutogenBuildDir_, '/', this->RccPathChecksum_, '/',
+ this->RccFileName_);
+ }
// rcc output file name
if (this->IsMultiConfig()) {
@@ -521,7 +546,8 @@ bool cmQtAutoRccT::GenerateWrapper()
} // End of unnamed namespace
-bool cmQtAutoRcc(cm::string_view infoFile, cm::string_view config)
+bool cmQtAutoRcc(cm::string_view infoFile, cm::string_view config,
+ cm::string_view executableConfig)
{
- return cmQtAutoRccT().Run(infoFile, config);
+ return cmQtAutoRccT().Run(infoFile, config, executableConfig);
}