4
0
mirror of https://github.com/QuasarApp/qca.git synced 2025-05-11 10:19:33 +00:00

some attempt at windows support for the qcm files

svn path=/trunk/kdesupport/qca/; revision=958851
This commit is contained in:
Justin Karneges 2009-04-24 20:41:33 +00:00
parent 499388751c
commit f009a7c282
3 changed files with 33 additions and 6 deletions

@ -5,8 +5,8 @@ section: project
arg: release,Build with debugging turned off (default).
arg: debug,Build with debugging turned on.
arg: debug-and-release,Build two versions, with and without debugging turned on (mac only).
arg: no-separate-debug-info,Do not store debug information in a separate file (default for mac).
arg: separate-debug-info,Strip debug information into a separate .debug file (default for non-mac).
arg: no-separate-debug-info,Do not store debug information in a separate file (unix only, default for mac).
arg: separate-debug-info,Strip debug information into a separate .debug file (unix only, default for non-mac).
arg: no-framework,Do not build as a Mac framework.
arg: framework,Build as a Mac framework (default).
-----END QCMOD-----
@ -72,6 +72,20 @@ public:
}
#endif
#ifdef Q_OS_WIN
if(opt_no_separate_debug_info)
{
printf("\nError: The --no-separate-debug-info option is for unix only.\n");
exit(1);
}
if(opt_separate_debug_info)
{
printf("\nError: The --separate-debug-info option is for unix only.\n");
exit(1);
}
#endif
if(opt_framework && opt_debug)
{
printf("\nError: Cannot use both --framework and --debug.\n");
@ -159,7 +173,7 @@ public:
}
else // default
{
#ifndef Q_OS_MAC
#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC)
qc_buildmode_separate_debug_info = true;
#endif
}

@ -18,6 +18,7 @@ public:
bool exec()
{
#ifndef Q_OS_WIN
// --prefix=$pwd ?
QString datadir;
if(QFile::exists(conf->getenv("PREFIX") + "/qca.pro"))
@ -26,10 +27,12 @@ public:
datadir = "$$DATADIR/qca";
conf->addExtra(makeEscapedDefine("DATADIR", datadir));
#endif
QString str;
QFile f;
#ifndef Q_OS_WIN
// HAVE_SYS_FILIO_H
if(conf->findHeader("sys/filio.h", QStringList(), &str))
{
@ -50,6 +53,7 @@ public:
}
str = QString();
#endif
if(conf->getenv("QC_DISABLE_TESTS") == "Y")
str += "QCA_NO_TESTS = 1\n";
@ -73,11 +77,13 @@ public:
sdk = qc_universal_sdk;
#endif
// write confapp_unix.pri
// write confapp.pri
str = QString();
#ifndef Q_OS_WIN
QString var = conf->getenv("BINDIR");
if(!var.isEmpty())
str += QString("BINDIR = %1\n").arg(var);
#endif
if(debug) // debug or debug-and-release
str += QString("CONFIG += debug\n");
else // release
@ -98,12 +104,14 @@ public:
if(!sdk.isEmpty())
str += QString("QMAKE_MAC_SDK = %1\n").arg(sdk);
}
f.setFileName("confapp_unix.pri");
f.setFileName("confapp.pri");
if(f.open(QFile::WriteOnly | QFile::Truncate))
f.write(str.toLatin1());
f.close();
#ifndef Q_OS_WIN
QString prefix = conf->getenv("PREFIX");
#endif
QString incdir = conf->getenv("INCDIR");
QString libdir = conf->getenv("LIBDIR");
@ -134,6 +142,7 @@ public:
).arg(QLibraryInfo::location(QLibraryInfo::DataPath));
conf->addExtra(str);
#ifndef Q_OS_WIN
// write pkg-config files
QString pkg_template1 = QString(
@ -210,6 +219,7 @@ public:
).arg(pcfiles.join(" "));
conf->addExtra(str);
}
#endif
return true;
}

@ -2,7 +2,7 @@
-----BEGIN QCMOD-----
name: qcapluginpath
section: project
arg: plugins-path=[path],Path to install to. Default: qtdir/plugins
arg: plugins-path=[path],Path to install to (unix only). Default: qtdir/plugins
-----END QCMOD-----
*/
@ -18,6 +18,7 @@ public:
bool exec()
{
#ifndef Q_OS_WIN
QString plugins_path = conf->getenv("QC_PLUGINS_PATH");
// default to qtdir
@ -31,6 +32,8 @@ public:
"INSTALLS += target\n"
).arg(plugins_path);
conf->addExtra(str);
#endif
return true;
}
};