Skip to content

Instantly share code, notes, and snippets.

@Hiradur
Last active December 22, 2015 15:52
Show Gist options
  • Save Hiradur/a5573323ae2701bef6bc to your computer and use it in GitHub Desktop.
Save Hiradur/a5573323ae2701bef6bc to your computer and use it in GitHub Desktop.
Patch to build Ogre 1.8 on OS X 10.10 Yosemite
diff -r edccf8cc52e3 CMakeLists.txt
--- a/CMakeLists.txt Fri Jun 20 00:53:20 2014 +0200
+++ b/CMakeLists.txt Sun May 24 15:45:17 2015 +0200
@@ -235,10 +235,6 @@
string (REPLACE "-msse" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
elseif (APPLE AND NOT OGRE_BUILD_PLATFORM_APPLE_IOS)
- # Set 10.5 as the base SDK by default
- set(XCODE_ATTRIBUTE_SDKROOT macosx)
- set(CMAKE_OSX_SYSROOT macosx)
- set(CMAKE_OSX_DEPLOYMENT_TARGET 10.5)
if (NOT CMAKE_OSX_ARCHITECTURES)
set(CMAKE_OSX_ARCHITECTURES ${ARCHS_STANDARD_32_64_BIT})
diff -r edccf8cc52e3 RenderSystems/GL/src/OSX/OgreOSXCocoaWindow.mm
--- a/RenderSystems/GL/src/OSX/OgreOSXCocoaWindow.mm Fri Jun 20 00:53:20 2014 +0200
+++ b/RenderSystems/GL/src/OSX/OgreOSXCocoaWindow.mm Sun May 24 15:45:17 2015 +0200
@@ -118,7 +118,7 @@
NSString *windowTitle = [NSString stringWithCString:name.c_str() encoding:NSUTF8StringEncoding];
int winx = 0, winy = 0;
int depth = 32;
- NameValuePairList::const_iterator opt(NULL);
+ NameValuePairList::const_iterator opt;
mIsFullScreen = fullScreen;
@@ -232,7 +232,7 @@
}
else
{
- NameValuePairList::const_iterator param_useNSView_pair(NULL);
+ NameValuePairList::const_iterator param_useNSView_pair;
param_useNSView_pair = miscParams->find("macAPICocoaUseNSView");
if(param_useNSView_pair != miscParams->end())
@kentamt
Copy link

kentamt commented Nov 21, 2015

I want to build ogre 1.8 on Yosemite.
How can I use it?

@Hiradur
Copy link
Author

Hiradur commented Dec 22, 2015

@kkkmmm
Either apply the changes manually or run this in the Terminal in Ogre's root dir:

wget https://gist.github.com/Hiradur/a5573323ae2701bef6bc/download
patch -p1 < ogre1.8osx.patch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment