X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=Build;h=b46c5ad4c40d8c80c9dbc315af4be6abd40f02d0;hb=a16145549dc87c3b12671f797bd77b14bcc7786b;hp=1a4a262f3a1b6387683a4636af1beb222cae62ee;hpb=44b8b5f558dc07eab052994867e5247b73618253;p=libs%2Fgl.git diff --git a/Build b/Build index 1a4a262f..b46c5ad4 100644 --- a/Build +++ b/Build @@ -1,6 +1,6 @@ package "mspgl" { - version "2.0"; + version "3.0"; description "Lightweight C++/OpenGL graphics engine"; require "mspcore"; @@ -8,30 +8,42 @@ package "mspgl" require "mspmath"; require "mspgui"; require "sigc++-2.0"; - if_arch "android" - { - require "opengles"; - }; - if_arch "!android" + + feature "vulkan" "Use Vulkan instead of OpenGL as backend"; + if_feature "vulkan" { - require "opengl"; + require "vulkan"; }; - generate "GLEX" + if_feature "!vulkan" { - in_suffix ".glext"; - out_suffix ".cpp"; - out_suffix ".h"; - command "scripts/extgen.py"; if_arch "android" { - argument "gles2"; + 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"; out_suffix ".cpp"; command "mspdatatool"; arguments "-i" "-n" "Msp::GL"; @@ -41,15 +53,59 @@ package "mspgl" 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_map { - map "source" "include/msp/gl"; + 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"; - map "shaderlib" "include/msp/gl/resources"; }; }; @@ -60,22 +116,20 @@ package "mspgl" use "mspgl"; }; - program "shaders" - { - source "demos/shaders.cpp"; - use "mspgl"; - }; - - program "cubemap" + program "desertpillars" { - source "demos/cubemap.cpp"; + source "demos/desertpillars/source"; + require "sigc++-2.0"; use "mspgl"; + build_info + { + standard CXX "c++14"; + }; }; - program "desertpillars" + program "glslcompiler" { - source "demos/desertpillars.cpp"; - require "sigc++-2.0"; + source "tools/glslcompiler.cpp"; use "mspgl"; };