From f0e85e21b39094904de10109e532242c24c44fb4 Mon Sep 17 00:00:00 2001 From: otfallen Date: Sat, 29 Sep 2012 22:57:14 +0000 Subject: [PATCH] Mac OS X port progress Tested-by: Christopher Eklund Signed-off-by: otfallen Signed-off-by: Christopher Eklund --- src/framework/CMakeLists.txt | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/framework/CMakeLists.txt b/src/framework/CMakeLists.txt index 28366b4b..0debf650 100644 --- a/src/framework/CMakeLists.txt +++ b/src/framework/CMakeLists.txt @@ -255,7 +255,15 @@ if(FRAMEWORK_GRAPHICS) set(framework_INCLUDE_DIRS ${framework_INCLUDE_DIRS} ${EGL_INCLUDE_DIR} ${OPENGLES1_INCLUDE_DIR}) set(framework_LIBRARIES ${framework_LIBRARIES} ${EGL_LIBRARY} ${OPENGLES1_LIBRARY}) else() - find_package(OpenGL REQUIRED) + ## TODO: CMake Documentation says that this is not the right + # Thing for Mac OS X, but it works for now. + if(APPLE) + include_directories(/usr/X11R6/include/) + link_directories(/usr/X11R6/lib/) + SET(OPENGL_LIBRARIES GL) + else() + find_package(OpenGL REQUIRED) + endif() find_package(GLEW REQUIRED) set(framework_LIBRARIES ${framework_LIBRARIES} ${GLEW_LIBRARY} ${OPENGL_LIBRARIES}) endif() @@ -394,6 +402,8 @@ if(FRAMEWORK_SOUND) if(WIN32) set(framework_LIBRARIES ${framework_LIBRARIES} winmm) + elseif(APPLE) + set(framework_LIBRARIES ${framework_LIBRARIES} System) else() set(framework_LIBRARIES ${framework_LIBRARIES} rt) endif()