X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=Build;h=b46c5ad4c40d8c80c9dbc315af4be6abd40f02d0;hp=a70e9ac90bb1d5871c9cdcf5ec9edd21868db08d;hb=HEAD;hpb=fd1b14ee491dfd62881876afe007ac63301b422a diff --git a/Build b/Build index a70e9ac9..c195c2c8 100644 --- a/Build +++ b/Build @@ -1,18 +1,153 @@ -/* $Id$ */ - package "mspgl" { - description "C++ wrappers for OpenGL"; - version "0.1"; + version "3.0"; + description "Lightweight C++/OpenGL graphics engine"; - require "opengl"; + require "mspcore"; require "mspdatafile"; - require "libpng"; + require "mspmath"; + require "mspgui"; + require "sigc++-2.0"; + + feature "vulkan" "Use Vulkan instead of OpenGL as backend"; + if_feature "vulkan" + { + require "vulkan"; + }; + + if_feature "!vulkan" + { + if_arch "android" + { + require "opengles"; + }; + if_arch "!android" + { + require "opengl"; + }; + + generate "GLEX" + { + in_suffix ".glext"; + out_suffix ".cpp"; + out_suffix ".h"; + command "scripts/extgen.py"; + if_arch "android" + { + argument "gles2"; + }; + }; + }; + + generate "RES" + { + in_suffix ".glsl"; + in_suffix ".samp"; + in_suffix ".mesh"; + in_suffix ".png"; + out_suffix ".cpp"; + command "mspdatatool"; + arguments "-i" "-n" "Msp::GL"; + out_argument "-o"; + processing_unit DIRECTORY; + }; library "mspgl" { - source "source"; + source "source/core"; + source "source/materials"; + source "source/render"; + source "source/effects"; + source "source/animation"; + source "source/resources"; + source "source/glsl"; + source "source/builders"; + if_feature "vulkan" + { + source "source/backends/vulkan"; + build_info + { + incpath "source/backends/vulkan"; + }; + }; + if_feature "!vulkan" + { + source "source/backends/opengl"; + build_info + { + incpath "source/backends/opengl"; + }; + }; + source "extensions"; + source "builtin_data"; + source "shaderlib"; + build_info + { + incpath "source"; + incpath "source/core"; + incpath "source/materials"; + incpath "source/render"; + incpath "source/effects"; + incpath "source/animation"; + incpath "source/resources"; + incpath "source/builders"; + standard CXX "c++11"; + }; install true; - install_headers "msp/gl"; + install_map + { + map "source/core" "include/msp/gl"; + map "source/materials" "include/msp/gl"; + map "source/render" "include/msp/gl"; + map "source/effects" "include/msp/gl"; + map "source/animation" "include/msp/gl"; + map "source/resources" "include/msp/gl"; + map "source/glsl" "include/msp/gl/glsl"; + map "source/builders" "include/msp/gl"; + map "source/backends/opengl" "include/msp/gl"; + map "source/backends/vulkan" "include/msp/gl"; + map "extensions" "include/msp/gl/extensions"; + }; + }; + + program "viewer" + { + source "tools/viewer.cpp"; + require "sigc++-2.0"; + use "mspgl"; + }; + + program "desertpillars" + { + source "demos/desertpillars/source"; + require "sigc++-2.0"; + use "mspgl"; + build_info + { + standard CXX "c++14"; + }; + }; + + program "forestpond" + { + source "demos/forestpond/source"; + require "sigc++-2.0"; + use "mspgl"; + build_info + { + standard CXX "c++14"; + }; + }; + + program "glslcompiler" + { + source "tools/glslcompiler.cpp"; + use "mspgl"; + }; + + source_tarball + { + source "License.txt"; + source "Changelog.txt"; }; };