Add dub support

This commit is contained in:
Hackerpilot 2016-01-13 23:53:30 -08:00
parent 3fd5e4ee62
commit 5437ceb846
5 changed files with 58 additions and 1 deletions

9
.gitignore vendored
View File

@ -1,14 +1,19 @@
# Windows binaries
*.exe
*.obj
*.lib
*.dll
# *nix binaries
dcd-client
dcd-server
*.o
*.a
*.so
# Perf reports
perf.data
perf.data.old
# Valgrind reports
callgrind.*
@ -20,3 +25,7 @@ githash.txt
tests/tc*/actual*.txt
stderr.txt
stdout.txt
# Dub files
.dub
dub.selections.json

43
dub.json Normal file
View File

@ -0,0 +1,43 @@
{
"name": "dcd",
"description": "The D Completion Daemon is an auto-complete program for the D programming language",
"copyright": "Copyright © 2015, Brian Schott",
"authors": [
"Brian Schott"
],
"license": "GPL-3.0",
"dependencies": {
"dsymbol": "~>0.1.0",
"libdparse": "~>0.3.0",
"msgpack-d": "~>1.0.0-beta.2"
},
"versions": ["built_with_dub"],
"configurations": [
{
"name": "library",
"targetType": "library",
"excludedSourceFiles": [
"src/client/*",
"src/server/server.d"
]
},
{
"name": "client",
"targetType": "executable",
"targetName": "dcd-client",
"mainSourceFile": "src/client/client.d",
"excludedSourceFiles": [
"src/server/*"
]
},
{
"name": "server",
"targetType": "executable",
"targetName": "dcd-server",
"mainSourceFile": "src/server/server.d",
"excludedSourceFiles": [
"src/client/*"
]
}
]
}

View File

@ -70,6 +70,8 @@ int main(string[] args)
{
version (Windows)
writeln(DCD_VERSION);
else version(built_with_dub)
writeln(DCD_VERSION);
else
write(DCD_VERSION, " ", GIT_HASH);
return 0;

View File

@ -21,9 +21,10 @@ module common.dcd_version;
/**
* Human-readable version number
*/
enum DCD_VERSION = "v0.7.3";
enum DCD_VERSION = "v0.7.4";
version (Windows) {}
else version (built_with_dub) {}
else
{
/**

View File

@ -82,6 +82,8 @@ int main(string[] args)
{
version (Windows)
writeln(DCD_VERSION);
else version (built_with_dub)
writeln(DCD_VERSION);
else
write(DCD_VERSION, " ", GIT_HASH);
return 0;