]> git.tdb.fi Git - libs/core.git/blobdiff - Build
Windows uses ; as separator in $PATH
[libs/core.git] / Build
diff --git a/Build b/Build
index cf72f3dc1231a01bda38af29e17adeb8f9fd6c57..2aa78db278ab0674dfd1509fa88f91eebc803b8f 100644 (file)
--- a/Build
+++ b/Build
@@ -1,17 +1,14 @@
 package "mspcore"
 {
-       version "1.1";
+       version "2.0";
        description "Mikkosoft Productions core library";
 
        require "sigc++-2.0";
-       if "arch!=win32"
+       build_info
        {
-               build_info
-               {
-                       library "pthread";
-               };
+               threads true;
        };
-       if "arch=linux"
+       if_arch "linux"
        {
                build_info
                {
@@ -19,46 +16,13 @@ package "mspcore"
                };
        };
 
-       headers "msp/core"
-       {
-               source "source/core";
-               install true;
-       };
-
-       headers "msp/time"
-       {
-               source "source/time";
-               install true;
-       };
-
-       headers "msp/debug"
-       {
-               source "source/debug";
-               install true;
-       };
-
-       headers "msp/strings"
-       {
-               source "source/strings";
-               install true;
-       };
-
-       headers "msp/stringcodec"
-       {
-               source "source/stringcodec";
-               install true;
-       };
-
-       headers "msp/io"
+       feature "zlib" "Support compression with zlib"
        {
-               source "source/io";
-               install true;
+               default "yes";
        };
-
-       headers "msp/fs"
+       if_feature "zlib"
        {
-               source "source/fs";
-               install true;
+               require "zlib";
        };
 
        library "mspcore"
@@ -70,46 +34,55 @@ package "mspcore"
                source "source/stringcodec";
                source "source/io";
                source "source/fs";
+               if_arch "windows"
+               {
+                       overlay "windows";
+               };
+               if_arch "!windows"
+               {
+                       overlay "unix";
+               };
                install true;
+               install_map
+               {
+                       map "source" "include/msp";
+               };
        };
 
        program "grep"
        {
                source "examples/grep.cpp";
-               build_info
-               {
-                       library "mspcore";
-               };
+               use "mspcore";
        };
 
        program "transcode"
        {
                source "examples/transcode.cpp";
-               build_info
-               {
-                       library "mspcore";
-               };
+               use "mspcore";
        };
 
        program "ls"
        {
                source "examples/ls.cpp";
-               build_info
-               {
-                       library "mspcore";
-               };
+               use "mspcore";
        };
 
        program "syncdir"
        {
                source "examples/syncdir.cpp";
-               build_info
+               use "mspcore";
+       };
+
+       if_feature "zlib"
+       {
+               program "z"
                {
-                       library "mspcore";
+                       source "examples/z.cpp";
+                       use "mspcore";
                };
        };
 
-       tarball "@src"
+       source_tarball
        {
                source "License.txt";
                source "source/stringcodec/jisx0208.table";