put the rules logic in its own .pri file, and allow easier override
This commit is contained in:
parent
6cbcf65339
commit
50b0e95314
|
@ -1,13 +1,6 @@
|
|||
# no manual edits - this file is autogenerated by dmake
|
||||
|
||||
!win32 {
|
||||
CONFIG += HAVE_RULES
|
||||
}
|
||||
HAVE_RULES {
|
||||
DEFINES += HAVE_RULES
|
||||
LIBS += -L../externals -lpcre
|
||||
INCLUDEPATH += ../externals
|
||||
}
|
||||
include($$PWD/pcrerules.pri)
|
||||
INCLUDEPATH += ../externals/tinyxml
|
||||
HEADERS += $${BASEPATH}check.h \
|
||||
$${BASEPATH}check64bit.h \
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
# On non-Windows, if the variable HAVE_RULES is empty, default to using PCRE and enabling rules
|
||||
!win32:isEmpty(HAVE_RULES) {
|
||||
CONFIG += use_pcre_rules
|
||||
}
|
||||
|
||||
# If HAVE_RULES=yes is passed to qmake, use PCRE and enable rules
|
||||
contains(HAVE_RULES, [yY][eE][sS]) {
|
||||
CONFIG += use_pcre_rules
|
||||
}
|
||||
|
||||
use_pcre_rules {
|
||||
DEFINES += HAVE_RULES
|
||||
LIBS += -L../externals -lpcre
|
||||
INCLUDEPATH += ../externals
|
||||
message("Rules enabled - to disable them and remove the dependency on PCRE, pass HAVE_RULES=no to qmake.")
|
||||
} else {
|
||||
message("Rules disabled - to enable them, make PCRE available and pass HAVE_RULES=yes to qmake.")
|
||||
}
|
|
@ -182,14 +182,7 @@ int main(int argc, char **argv)
|
|||
if (fout1.is_open())
|
||||
{
|
||||
fout1 << "# no manual edits - this file is autogenerated by dmake\n\n";
|
||||
fout1 << "!win32 {\n";
|
||||
fout1 << " CONFIG += HAVE_RULES\n";
|
||||
fout1 << "}\n";
|
||||
fout1 << "HAVE_RULES {\n";
|
||||
fout1 << " DEFINES += HAVE_RULES\n";
|
||||
fout1 << " LIBS += -L../externals -lpcre\n";
|
||||
fout1 << " INCLUDEPATH += ../externals\n";
|
||||
fout1 << "}\n";
|
||||
fout1 << "include($$PWD/pcrerules.pri)\n";
|
||||
fout1 << "INCLUDEPATH += ../externals/tinyxml\n";
|
||||
fout1 << "HEADERS += $${BASEPATH}check.h \\\n";
|
||||
for (unsigned int i = 0; i < libfiles.size(); ++i)
|
||||
|
|
Loading…
Reference in New Issue