From 3ad76286e688598445092b4073ccf3f53aa541f3 Mon Sep 17 00:00:00 2001 From: Erwin Coumans Date: Wed, 13 Mar 2013 14:02:49 -0700 Subject: [PATCH] fix mac build --- btgui/GwenOpenGLTest/premake4.lua | 8 ++++++++ btgui/OpenGLTrueTypeFont/premake4.lua | 5 ++--- btgui/OpenGLWindow/premake4.lua | 9 +++++++++ build/premake4_osx | Bin demo/gpudemo/main_opengl3core.cpp | 4 ++-- demo/gpudemo/premake4.lua | 9 ++++++++- 6 files changed, 29 insertions(+), 6 deletions(-) mode change 100644 => 100755 build/premake4_osx diff --git a/btgui/GwenOpenGLTest/premake4.lua b/btgui/GwenOpenGLTest/premake4.lua index 844682471..24d642207 100644 --- a/btgui/GwenOpenGLTest/premake4.lua +++ b/btgui/GwenOpenGLTest/premake4.lua @@ -59,3 +59,11 @@ "../OpenGLWindow/X11OpenGLWindow.cpp" } end + if os.is("MacOSX") then + links{"Cocoa.framework"} +print("hello!") + files{ + "../OpenGLWindow/MacOpenGLWindow.mm", + "../OpenGLWindow/MacOpenGLWindow.h", + } + end diff --git a/btgui/OpenGLTrueTypeFont/premake4.lua b/btgui/OpenGLTrueTypeFont/premake4.lua index b0d886b82..1532a82f9 100644 --- a/btgui/OpenGLTrueTypeFont/premake4.lua +++ b/btgui/OpenGLTrueTypeFont/premake4.lua @@ -47,15 +47,14 @@ "../OpenGLWindow/X11OpenGLWindow.h", "../OpenGLWindow/X11OpenGLWindow.cpp" } + end - if os.is("MacOSX") then - links {"BulletFileLoader"} + if os.is("MacOSX") then links { "Cocoa.framework" } files{ "../OpenGLWindow/MacOpenGLWindow.h", "../OpenGLWindow/MacOpenGLWindow.mm", } - end end diff --git a/btgui/OpenGLWindow/premake4.lua b/btgui/OpenGLWindow/premake4.lua index 720100736..ad5085bd0 100644 --- a/btgui/OpenGLWindow/premake4.lua +++ b/btgui/OpenGLWindow/premake4.lua @@ -62,3 +62,12 @@ "X11OpenGLWindows.h" } end + if os.is("MacOSX") then + links{"Cocoa.framework"} + files + { + "../OpenGLWindow/MacOpenGLWindow.h", + "../OpenGLWindow/MacOpenGLWindow.mm", + } + end + diff --git a/build/premake4_osx b/build/premake4_osx old mode 100644 new mode 100755 diff --git a/demo/gpudemo/main_opengl3core.cpp b/demo/gpudemo/main_opengl3core.cpp index aa027f968..af66698a5 100644 --- a/demo/gpudemo/main_opengl3core.cpp +++ b/demo/gpudemo/main_opengl3core.cpp @@ -6,11 +6,11 @@ #endif #ifdef __APPLE__ -#include "MacOpenGLWindow.h" +#include "OpenGLWindow/MacOpenGLWindow.h" #elif defined _WIN32 #include "OpenGLWindow/Win32OpenGLWindow.h" #elif defined __linux -#include "../rendering/rendertest/X11OpenGLWindow.h" +#include "OpenGLWindow/X11OpenGLWindow.h" #endif #include "OpenGLWindow/GLPrimitiveRenderer.h" diff --git a/demo/gpudemo/premake4.lua b/demo/gpudemo/premake4.lua index 1d3340898..6997bbca4 100644 --- a/demo/gpudemo/premake4.lua +++ b/demo/gpudemo/premake4.lua @@ -84,10 +84,17 @@ function createProject(vendor) "../../btgui/OpenGLWindow/X11OpenGLWindows.h" } end + if os.is("MacOSX") then + links {"Cocoa.framework"} + files { + "../../btgui/OpenGLWindow/MacOpenGLWindow.h", + "../../btgui/OpenGLWindow/MacOpenGLWindow.mm", + } + end end end createProject("Apple") createProject("AMD") createProject("Intel") -createProject("NVIDIA") \ No newline at end of file +createProject("NVIDIA")