Commit 2e18801a authored by Sebastian Holtermann's avatar Sebastian Holtermann
Browse files

QtAutogen: Move util functions to file begin

parent 048aac2c
Pipeline #37280 passed with stage
......@@ -35,6 +35,26 @@
#include <utility>
#include <vector>
static void utilCopyTargetProperty(cmTarget* destinationTarget,
cmTarget* sourceTarget,
const std::string& propertyName)
{
const char* propertyValue = sourceTarget->GetProperty(propertyName);
if (propertyValue) {
destinationTarget->SetProperty(propertyName, propertyValue);
}
}
static std::string utilStripCR(std::string const& line)
{
// Strip CR characters rcc may have printed (possibly more than one!).
std::string::size_type cr = line.find('\r');
if (cr != line.npos) {
return line.substr(0, cr);
}
return line;
}
static std::string GetAutogenTargetName(cmGeneratorTarget const* target)
{
std::string autogenTargetName = target->GetName();
......@@ -404,26 +424,6 @@ static void RccMergeOptions(std::vector<std::string>& opts,
opts.insert(opts.end(), extraOpts.begin(), extraOpts.end());
}
static void utilCopyTargetProperty(cmTarget* destinationTarget,
cmTarget* sourceTarget,
const std::string& propertyName)
{
const char* propertyValue = sourceTarget->GetProperty(propertyName);
if (propertyValue) {
destinationTarget->SetProperty(propertyName, propertyValue);
}
}
static std::string utilStripCR(std::string const& line)
{
// Strip CR characters rcc may have printed (possibly more than one!).
std::string::size_type cr = line.find('\r');
if (cr != line.npos) {
return line.substr(0, cr);
}
return line;
}
/// @brief Reads the resource files list from from a .qrc file - Qt5 version
/// @return True if the .qrc file was successfully parsed
static bool RccListInputsQt5(cmSourceFile* sf, cmGeneratorTarget const* target,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment