From 5a0b744e73367e63b64e5b5d8ef6384734b8a566 Mon Sep 17 00:00:00 2001 From: erwin coumans Date: Wed, 6 May 2015 12:05:25 -0700 Subject: [PATCH] fixed premake4 issue causing the build to fail on non-Mac platforms --- build3/findOpenGLGlewGlut.lua | 4 ---- build3/premake4.lua | 19 +++++++++++++++---- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/build3/findOpenGLGlewGlut.lua b/build3/findOpenGLGlewGlut.lua index 6ed26e65e..886b6a561 100644 --- a/build3/findOpenGLGlewGlut.lua +++ b/build3/findOpenGLGlewGlut.lua @@ -29,10 +29,6 @@ configuration {"Windows"} links {"opengl32","glu32"} configuration {"MacOSX"} - if (not findOpenGL3()) then - defines {"NO_OPENGL3"} - end - links { "OpenGL.framework"} configuration {"not Windows", "not MacOSX"} if os.is("Linux") then diff --git a/build3/premake4.lua b/build3/premake4.lua index 9a6965110..53c087357 100644 --- a/build3/premake4.lua +++ b/build3/premake4.lua @@ -30,6 +30,11 @@ description = "Dynamically load OpenGL (instead of static/dynamic linking)" } + newoption + { + trigger = "noopengl3", + description = "Don't compile any OpenGL3+ code" + } newoption { @@ -37,7 +42,7 @@ description = "Use Midi controller to control parameters" } --- _OPTIONS["midi"] = "1"; +-- --_OPTIONS["midi"] = "1"; newoption { @@ -111,6 +116,10 @@ dofile ("findOpenCL.lua") dofile ("findDirectX11.lua") dofile ("findOpenGLGlewGlut.lua") + + if (not findOpenGL3()) then + defines {"NO_OPENGL3"} + end language "C++" @@ -122,9 +131,11 @@ include "../examples/HelloWorld" include "../examples/BasicDemo" - include "../examples/ThirdPartyLibs/enet" - include "../test/enet/client" - include "../test/enet/server" + if _OPTIONS["enet"] then + include "../examples/ThirdPartyLibs/enet" + include "../test/enet/client" + include "../test/enet/server" + end if not _OPTIONS["without-gtest"] then include "../test/gtest-1.7.0"