Commit 293618b1 authored by Liu Junyan's avatar Liu Junyan Committed by DailyShana

cmake: fix problems with building on macos

parent ec70129b
......@@ -48,6 +48,12 @@ else ()
target_link_libraries (ygopro ${CMAKE_THREAD_LIBS_INIT} ${DL_LIBRARIES})
endif ()
if (APPLE)
find_library(COCOA_LIBRARY Cocoa)
find_library(IOKIT_LIBRARY IOKit)
target_link_libraries(ygopro ${COCOA_LIBRARY} ${IOKIT_LIBRARY})
endif ()
if (USE_IRRKLANG)
add_definitions ( "-DYGOPRO_USE_IRRKLANG" )
if (MSVC)
......
......@@ -56,8 +56,13 @@ inline int myswprintf(wchar_t(&buf)[N], const wchar_t* fmt, TR... args) {
}
#include <irrlicht.h>
#ifdef __APPLE__
#include <OpenGL/gl.h>
#include <OpenGL/glu.h>
#else //__APPLE__
#include <GL/gl.h>
#include <GL/glu.h>
#endif //__APPLE__
#include "CGUITTFont.h"
#include "CGUIImageButton.h"
#include <iostream>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment