X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=Build;h=b46c5ad4c40d8c80c9dbc315af4be6abd40f02d0;hp=fb571b0c085f7665ed579412623d715f6e87fdbb;hb=99ca354f18119f82f1adeca100cd665a8f640317;hpb=b30777959d8e2ab2caf489e32f40390f60a75fcb diff --git a/Build b/Build index fb571b0c..b46c5ad4 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"; + }; }; }; @@ -51,6 +61,22 @@ package "mspgl" 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"; @@ -64,6 +90,7 @@ package "mspgl" incpath "source/animation"; incpath "source/resources"; incpath "source/builders"; + standard CXX "c++11"; }; install true; install_map @@ -76,6 +103,8 @@ package "mspgl" 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"; }; }; @@ -89,9 +118,13 @@ package "mspgl" program "desertpillars" { - source "demos/desertpillars.cpp"; + source "demos/desertpillars/source"; require "sigc++-2.0"; use "mspgl"; + build_info + { + standard CXX "c++14"; + }; }; program "glslcompiler"