diff options
author | Christian Kandeler <christian.kandeler@nokia.com> | 2012-05-21 11:33:19 +0200 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@nokia.com> | 2012-05-21 12:35:29 +0200 |
commit | 0d6c47e447260727b5335eebd0e985dab09cde04 (patch) | |
tree | 382674660218345e88d54e72009ed0715144f2ff /src/tools | |
parent | f1f87065780eb5d262abf2b5462070f4ce3f0b39 (diff) | |
download | qt-creator-0d6c47e447260727b5335eebd0e985dab09cde04.tar.gz |
Start adding qbs support for src/tools.
Change-Id: I70b9f13c6dffa107b12eac09ed4495a5318fdb1e
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Diffstat (limited to 'src/tools')
-rw-r--r-- | src/tools/QtcTool.qbs | 5 | ||||
-rw-r--r-- | src/tools/mdnssd/mdnssd.qbs | 106 |
2 files changed, 111 insertions, 0 deletions
diff --git a/src/tools/QtcTool.qbs b/src/tools/QtcTool.qbs new file mode 100644 index 0000000000..2c8c43f767 --- /dev/null +++ b/src/tools/QtcTool.qbs @@ -0,0 +1,5 @@ +import qbs.base 1.0 + +Application { + destination: "bin" +} diff --git a/src/tools/mdnssd/mdnssd.qbs b/src/tools/mdnssd/mdnssd.qbs new file mode 100644 index 0000000000..96501952ce --- /dev/null +++ b/src/tools/mdnssd/mdnssd.qbs @@ -0,0 +1,106 @@ +import qbs.base 1.0 +import "../QtcTool.qbs" as QtcTool + +QtcTool { + name: "mdnssd" + + cpp.defines: [ "PID_FILE=\"/tmp/mdnsd.pid\"", "MDNS_UDS_SERVERPATH=\"/tmp/mdnsd\"", + "MDNS_DEBUGMSGS=0", "HAVE_IPV6" ] + cpp.includePaths: [ ".", buildDirectory ] + + Depends { name: "cpp" } + Depends { name: "Qt"; submodules: ['network' ] } + + files: [ + "uds_daemon.c", "uds_daemon.h", + "uDNS.c", "uDNS.h", + "mDNSDebug.c", "mDNSDebug.h", + "GenLinkedList.c", "GenLinkedList.h", + "dnssd_ipc.c", "dnssd_ipc.h", + "DNSDigest.c", + "DNSCommon.c", + "mDNSUNP.h", + "mDNSEmbeddedAPI.h", + "DNSCommon.h", + "DebugServices.h", + "dns_sd.h", + "mDNS.c", + ] + + Group { + condition: qbs.targetOS === "linux" + files: [ + "mDNSPosix.c", "mDNSPosix.h", + "PlatformCommon.c", "PlatformCommon.h", + "PosixDaemon.c", + "mDNSUNP.c" + ] + } + + Properties { + condition: qbs.targetOS === "linux" + cpp.defines: [ "_GNU_SOURCE", , "NOT_HAVE_SA_LEN", "USES_NETLINK", "HAVE_LINUX", + "TARGET_OS_LINUX" ] + } + + Properties { + condition: qbs.targetOS === "macx" + cpp.defines: [ "__MAC_OS_X_VERSION_MIN_REQUIRED=__MAC_OS_X_VERSION_10_4", + "__APPLE_USE_RFC_2292" ] + } + + Group { + condition: qbs.targetOS === "windows" + files: [ + "Firewall.h", "Firewall.cpp", + "mDNSWin32.h", "mDNSWin32.c", + "Poll.h", "Poll.c", + "Secret.h", "Secret.c", + "Service.h", "Service.c", + "DebugServices.c", + "LegacyNATTraversal.c", + "resource.h", + "RegNames.h", + "CommonServices.h", + "main.c", + "EventLog.mc", + "Service.rc" + ] + } + + Properties { + condition: qbs.targetOS === "windows" + cpp.defines: [ "_WIN32_WINNT=0x0501", "NDEBUG", "MDNS_DEBUGMSGS=0", "TARGET_OS_WIN32", + "WIN32_LEAN_AND_MEAN", "USE_TCP_LOOPBACK", "PLATFORM_NO_STRSEP", + "PLATFORM_NO_EPIPE", "PLATFORM_NO_RLIMIT", "UNICODE", "_UNICODE", + "_CRT_SECURE_NO_DEPRECATE", "_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES=1", + "_LEGACY_NAT_TRAVERSAL_" ] + cpp.dynamicLibraries: [ "ws2_32.lib", "advapi32.lib", "ole32.lib", "oleaut32.lib", + "iphlpapi.lib", "netapi32.lib", "user32.lib", "powrprof.lib", "shell32.lib" ] + } + + Properties { + condition: qbs.toolchain === 'mingw' || qbs.toolchain === 'gcc' + cpp.cFlags: [ "-Wno-unused-but-set-variable", "-Wno-strict-aliasing" ] + cpp.cxxFlags: [ "-Wno-unused-but-set-variable" ] + } + + FileTagger { + pattern: "*.mc" + fileTags: "mc" + } + + Rule { + inputs: "mc" + Artifact { + fileName: input.baseName + ".h" + fileTags: "hpp" + } + + prepare: { + var cmd = new Command("mc", input.fileName) + cmd.description = "mc" + return cmd + } + } +} |