mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-11-27 01:06:19 +00:00
Fixed: #872 NEL: build on Mac OS X
This commit is contained in:
parent
907b3fbe8a
commit
6f8bcca5b3
4 changed files with 23 additions and 1 deletions
|
@ -92,8 +92,13 @@ IF(WITH_3D)
|
|||
IF(WITH_DRIVER_OPENGL)
|
||||
FIND_PACKAGE(OpenGL)
|
||||
IF(NOT WIN32)
|
||||
FIND_PACKAGE(X11)
|
||||
FIND_PACKAGE(XF86VidMode)
|
||||
ENDIF(NOT WIN32)
|
||||
IF(APPLE)
|
||||
# TODO: remove Carbon as soon as Cocoa Support is stable on Mac
|
||||
FIND_LIBRARY(CARBON NAMES Carbon)
|
||||
ENDIF(APPLE)
|
||||
ENDIF(WITH_DRIVER_OPENGL)
|
||||
|
||||
IF(WITH_CEGUI)
|
||||
|
|
|
@ -120,7 +120,10 @@ MACRO(NL_SETUP_BUILD)
|
|||
IF(WITH_COVERAGE)
|
||||
SET(PLATFORM_CFLAGS "-fprofile-arcs -ftest-coverage ${PLATFORM_CFLAGS}")
|
||||
ENDIF(WITH_COVERAGE)
|
||||
SET(PLATFORM_LINKFLAGS "${CMAKE_THREAD_LIBS_INIT} -lc -lm -lstdc++ -lrt")
|
||||
SET(PLATFORM_LINKFLAGS "${CMAKE_THREAD_LIBS_INIT} -lc -lm -lstdc++")
|
||||
IF(NOT APPLE)
|
||||
SET(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -lrt")
|
||||
ENDIF(NOT APPLE)
|
||||
SET(NL_DEBUG_CFLAGS "-DNL_DEBUG -g")
|
||||
SET(NL_RELEASE_CFLAGS "-DNL_RELEASE -O6")
|
||||
SET(NL_RELEASEDEBUG_CFLAGS "-DNL_RELEASE_DEBUG -g -finline-functions -O3 ")
|
||||
|
|
|
@ -25,6 +25,14 @@ IF(WIN32)
|
|||
LINK_FLAGS "/NODEFAULTLIB:libcmt")
|
||||
ADD_DEFINITIONS(/DDRIVER_OPENGL_EXPORTS)
|
||||
ELSE(WIN32)
|
||||
# NOTE: I know, those hardcoded things are evil. But FindOpenGL on Mac simply
|
||||
# does not look for X11's OpenGL, just for the native one.
|
||||
# TODO: FIXME remove as soon as Cocoa Support is stable on Mac
|
||||
IF(APPLE)
|
||||
INCLUDE_DIRECTORIES("/usr/X11/include")
|
||||
TARGET_LINK_LIBRARIES(${NLDRV_OGL_LIB} ${CARBON} "-L/usr/X11/lib" "-lGL")
|
||||
ENDIF(APPLE)
|
||||
TARGET_LINK_LIBRARIES(${NLDRV_OGL_LIB} ${X11_LIBRARIES})
|
||||
IF(XF86VidMode_FOUND)
|
||||
INCLUDE_DIRECTORIES(${XF86VidMode_INCLUDE_DIR})
|
||||
ADD_DEFINITIONS(${XF86VidMode_DEFINITIONS})
|
||||
|
|
|
@ -1,5 +1,11 @@
|
|||
FILE(GLOB SRC *.cpp *.h)
|
||||
|
||||
# TODO: fixes a linking problem for libnelsound.dylib, but does not look like
|
||||
# the cleanest way to solve the issue. FIXME!
|
||||
IF(APPLE)
|
||||
SET(SRC ${SRC} driver/sound_driver.cpp driver/buffer.cpp)
|
||||
ENDIF(APPLE)
|
||||
|
||||
IF(NOT WIN32)
|
||||
ADD_LIBRARY(nelsound SHARED ${SRC})
|
||||
ELSE(NOT WIN32)
|
||||
|
|
Loading…
Reference in a new issue