Last active
December 24, 2015 13:46
-
-
Save LouisBrunner/51755a2a14d27fb59d77 to your computer and use it in GitHub Desktop.
Fix compilation under Mac for Ogre 1.9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/CMake/Packages/FindFreetype.cmake b/CMake/Packages/FindFreetype.cmake | |
--- a/CMake/Packages/FindFreetype.cmake | |
+++ b/CMake/Packages/FindFreetype.cmake | |
@@ -59,3 +59,5 @@ | |
# Reset framework finding | |
set(CMAKE_FIND_FRAMEWORK "FIRST") | |
+ | |
+set(FREETYPE_LIBRARIES ${FREETYPE_LIBRARY_REL} ${FREETYPE_LIBRARY_DBG}) | |
diff --git a/CMakeLists.txt b/CMakeLists.txt | |
--- a/CMakeLists.txt | |
+++ b/CMakeLists.txt | |
@@ -188,6 +188,10 @@ | |
endif() | |
endif ((CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANGXX) AND NOT MINGW) | |
+if (APPLE) | |
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -stdlib=libc++") | |
+endif () | |
+ | |
# determine system endianess | |
if (MSVC) | |
# This doesn't work on VS 2010 | |
diff --git a/RenderSystems/GL/src/OSX/OgreOSXWindow.cpp b/RenderSystems/GL/src/OSX/OgreOSXWindow.cpp | |
--- a/RenderSystems/GL/src/OSX/OgreOSXWindow.cpp | |
+++ b/RenderSystems/GL/src/OSX/OgreOSXWindow.cpp | |
@@ -323,7 +323,7 @@ | |
cgErr = CGLSetParameter(mCGLContextObj, kCGLCPSwapInterval, &swapInterval); | |
#else | |
GLint swapInterval = 1; | |
- cgErr = CGLSetParameter(mCGLContextObj, kCGLCPSwapInterval, &swapInterval); | |
+ cgErr = static_cast<CGError>(CGLSetParameter(mCGLContextObj, kCGLCPSwapInterval, &swapInterval)); | |
#endif | |
CG_CHECK_ERROR(cgErr) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment