X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=Build;h=16e9537c0ce5d7cd5d0f2d488bb90ea3aeae10e6;hp=6bf5ebb03a11208134dcf638ae001a36c735c663;hb=f1e296bb2442dfbea12e7b38a97cc152aa34569c;hpb=160e9eea29bd10034733d59507fa1bcca36be401 diff --git a/Build b/Build index 6bf5ebb0..16e9537c 100644 --- a/Build +++ b/Build @@ -8,24 +8,34 @@ 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"; + }; }; }; @@ -34,6 +44,7 @@ package "mspgl" in_suffix ".glsl"; in_suffix ".samp"; in_suffix ".mesh"; + in_suffix ".png"; out_suffix ".cpp"; command "mspdatatool"; arguments "-i" "-n" "Msp::GL"; @@ -51,7 +62,22 @@ package "mspgl" source "source/resources"; source "source/glsl"; source "source/builders"; - source "source/backends/opengl"; + 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"; @@ -65,7 +91,6 @@ package "mspgl" incpath "source/animation"; incpath "source/resources"; incpath "source/builders"; - incpath "source/backends/opengl"; standard CXX "c++11"; }; install true; @@ -80,6 +105,7 @@ package "mspgl" 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"; }; };