]> Some of my projects - anidbudpclient.git/commitdiff
Add initial qbs support.
authorAPTX <marek321@gmail.com>
Sun, 31 Aug 2014 16:22:39 +0000 (18:22 +0200)
committerAPTX <marek321@gmail.com>
Sun, 31 Aug 2014 16:22:39 +0000 (18:22 +0200)
anidbudpclient.qbs [new file with mode: 0644]
qbs/AniDBUdpClient/AniDBUdpClient.qbs [new file with mode: 0644]
qbs/QCA/qca.qbs [new file with mode: 0644]
qbs/QCA/qcavars.js [new file with mode: 0644]

diff --git a/anidbudpclient.qbs b/anidbudpclient.qbs
new file mode 100644 (file)
index 0000000..c3afa48
--- /dev/null
@@ -0,0 +1,132 @@
+import qbs.base 1.0
+import 'config.js' as Config
+
+Project {
+       Product {
+               type: ["dynamiclibrary", "installed_content"]
+               name: "anidbudpclient"
+               
+               qbsSearchPaths: ["qbs"]
+               
+               property bool buildRenameParser: true
+               property bool buildEncryption: false
+               
+               Depends { name: "cpp" }
+               Depends { name: "Qt"; submodules: ["core", "network"] }
+               Depends { condition: buildRenameParser; name: "Qt.script" }
+               Depends { condition: buildEncryption; name: "QCA" }
+               
+               cpp.defines: {
+                       var defines = ["ANIDBUDPCLIENT_LIBRARY"];
+                       if (!buildRenameParser)
+                               defines.push("ANIDBUDPCLIENT_NO_RENAMEPARSER");
+                       if (!buildEncryption)
+                               defines.push("ANIDBUDPCLIENT_NO_ENCRYPT");
+                       return defines;
+               }
+               
+               files: [
+                       "client.cpp",
+                       "abstractcommand.cpp",
+                       "authcommand.cpp",
+                       "encryptcommand.cpp",
+                       "rawcommand.cpp",
+                       "mylistaddcommand.cpp",
+                       "logoutcommand.cpp",
+                       "uptimecommand.cpp",
+                       "mylistcommand.cpp",
+                       "filecommand.cpp",
+                       "votecommand.cpp",
+                       "file.cpp",
+                       "hash.cpp",
+                       "hashproducer.cpp",
+                       "hashconsumer.cpp",
+                       "clientsentcommandsmodel.cpp",
+                       "clientqueuedcommandsmodel.cpp",
+                       "filerenamedelegate.cpp",
+                       "clientinterface.cpp",
+                       "myliststate.cpp",
+                       "episodecommand.cpp",
+
+                       "client.h",
+                       "anidbudpclient_global.h",
+                       "aniqflags.h",
+                       "abstractcommand.h",
+                       "authcommand.h",
+                       "encryptcommand.h",
+                       "rawcommand.h",
+                       "mylistaddcommand.h",
+                       "logoutcommand.h",
+                       "uptimecommand.h",
+                       "mylistcommand.h",
+                       "filecommand.h",
+                       "votecommand.h",
+                       "file.h",
+                       "hash.h",
+                       "hashproducer.h",
+                       "hashconsumer.h",
+                       "circularbuffer.h",
+                       "clientsentcommandsmodel.h",
+                       "clientqueuedcommandsmodel.h",
+                       "filerenamedelegate.h",
+                       "clientinterface.h",
+                       "myliststate.h",
+                       "episodecommand.h"
+               ]
+               
+               Group {
+                       files: [
+                               "include/AniDBUdpClient/Client",
+                               "include/AniDBUdpClient/AbstractCommand",
+                               "include/AniDBUdpClient/RawCommand",
+                               "include/AniDBUdpClient/MyListCommand",
+                               "include/AniDBUdpClient/MyListAddCommand",
+                               "include/AniDBUdpClient/MyListState",
+                               "include/AniDBUdpClient/FileCommand",
+                               "include/AniDBUdpClient/VoteCommand",
+                               "include/AniDBUdpClient/UptimeCommand",
+                               "include/AniDBUdpClient/File",
+                               "include/AniDBUdpClient/Hash",
+                               "include/AniDBUdpClient/ClientSentCommandsModel",
+                               "include/AniDBUdpClient/ClientQueuedCommandsModel",
+                               "include/AniDBUdpClient/FileRenameDelegate"
+                       ]
+               }
+               
+               Group {
+                       condition: buildRenameParser
+                       files: [
+                               "renameparser/renameengine.h",
+                               "renameparser/functions.h",
+                               "renameparser/abstractparser.h",
+                               "renameparser/ast.h",
+                               "renameparser/debugwalk.h",
+                               "renameparser/abstractwalk.h",
+                               "renameparser/evaluatewalk.h",
+                               "renameparser/analyzewalk.h",
+                               
+                               "renameparser/renameengine.cpp",
+                               "renameparser/functions.cpp",
+                               "renameparser/abstractparser.cpp",
+                               "renameparser/ast.cpp",
+                               "renameparser/debugwalk.cpp",
+                               "renameparser/abstractwalk.cpp",
+                               "renameparser/evaluatewalk.cpp",
+                               "renameparser/analyzewalk.cpp",
+
+                               "renameparser/AniAdd/renameparser.h",
+                               "renameparser/AniAdd/renamegrammar_p.h",
+                               "renameparser/AniAdd/lexer.h",
+                               "renameparser/AniAdd/renameparser.cpp",
+                               "renameparser/AniAdd/renamegrammar.cpp",
+                               "renameparser/AniAdd/lexer.cpp",
+
+                               "renameparser/ECMAScript/parser.h",
+                               "renameparser/ECMAScript/parser.cpp",
+
+                               "include/RenameParser/RenameEngine",
+                       ]
+               }
+       }
+
+}
\ No newline at end of file
diff --git a/qbs/AniDBUdpClient/AniDBUdpClient.qbs b/qbs/AniDBUdpClient/AniDBUdpClient.qbs
new file mode 100644 (file)
index 0000000..4e5132c
--- /dev/null
@@ -0,0 +1,7 @@
+import qbs.base 1.0
+
+Module {
+       Depends { name: "Qt"; submodules: ["core", "network"] }
+       Depends { name: "cpp" }
+       cpp.dynamicLibraries: ["anidbudpclient"]
+}
diff --git a/qbs/QCA/qca.qbs b/qbs/QCA/qca.qbs
new file mode 100644 (file)
index 0000000..714a38a
--- /dev/null
@@ -0,0 +1,25 @@
+// QCA and related files should be installed by QCA to the qbs share directoy
+// just like QCA installs its crypto.prf to the mkspecs/features directory.
+
+import qbs.base 1.0
+import 'qcavars.js' as QcaVars
+
+Module {
+       property string moduleName: "QtCrypto"
+       property string libraryName: "qca"
+       property string libraryVersion: "2"
+
+       property string incPath: QcaVars.incdir + "/" + moduleName
+       property string libPath: QcaVars.libdir
+       property string postfix: qbs.targetOS == "windows" ? libraryVersion : ""
+       property string internalLibraryName: libraryName + (qbs.targetOS == "windows" && qbs.debugInformation ? 'd' : '') + postfix
+
+       Depends { name: "cpp" }
+       Depends { name: "Qt.core" }
+
+       cpp.includePaths: [incPath];
+       cpp.libraryPaths: [libPath]
+
+       cpp.dynamicLibraries: qbs.targetOS !== 'mac' ? [internalLibraryName] : undefined
+       cpp.frameworks: qbs.targetOS === 'mac' ? [internalLibraryName] : undefined
+}
diff --git a/qbs/QCA/qcavars.js b/qbs/QCA/qcavars.js
new file mode 100644 (file)
index 0000000..40a74d1
--- /dev/null
@@ -0,0 +1,3 @@
+// This file should be generated during install.
+var incdir = "c:/Qt/qca/include"
+var libdir = "c:/Qt/qca/lib"
\ No newline at end of file