diff -r eeca1427ce51 code/nel/CMakeModules/nel.cmake --- a/code/nel/CMakeModules/nel.cmake Fri May 07 10:10:55 2010 +0200 +++ b/code/nel/CMakeModules/nel.cmake Mon May 10 15:47:44 2010 +0200 @@ -120,7 +120,10 @@ 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 ") diff -r eeca1427ce51 code/nel/include/nel/misc/common.h --- a/code/nel/include/nel/misc/common.h Fri May 07 10:10:55 2010 +0200 +++ b/code/nel/include/nel/misc/common.h Mon May 10 15:47:44 2010 +0200 @@ -298,7 +298,7 @@ #endif /// Returns Thread Id (note: on Linux, Process Id is the same as the Thread Id) -uint getThreadId(); +size_t getThreadId(); /// Returns a readable string from a vector of bytes. unprintable char are replaced by '?' std::string stringFromVector( const std::vector& v, bool limited = true ); diff -r eeca1427ce51 code/nel/src/3d/driver/opengl/CMakeLists.txt --- a/code/nel/src/3d/driver/opengl/CMakeLists.txt Fri May 07 10:10:55 2010 +0200 +++ b/code/nel/src/3d/driver/opengl/CMakeLists.txt Mon May 10 15:47:44 2010 +0200 @@ -9,6 +9,13 @@ ADD_LIBRARY(${NLDRV_OGL_LIB} SHARED ${SRC}) INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR} ${OPENGL_INCLUDE_DIR}) + +IF(APPLE) + INCLUDE_DIRECTORIES("/usr/X11/include") + TARGET_LINK_LIBRARIES(${NLDRV_OGL_LIB} + "-L/usr/X11/lib -lX11 -lGL -framework Foundation -framework Carbon") +ENDIF(APPLE) + TARGET_LINK_LIBRARIES(${NLDRV_OGL_LIB} nel3d nelmisc ${OPENGL_LIBRARIES}) SET_TARGET_PROPERTIES(${NLDRV_OGL_LIB} PROPERTIES VERSION ${NL_VERSION} diff -r eeca1427ce51 code/nel/src/misc/common.cpp --- a/code/nel/src/misc/common.cpp Fri May 07 10:10:55 2010 +0200 +++ b/code/nel/src/misc/common.cpp Mon May 10 15:47:44 2010 +0200 @@ -107,12 +107,12 @@ /* * Returns Thread Id (note: on Linux, Process Id is the same as the Thread Id) */ -uint getThreadId() +size_t getThreadId() { #ifdef NL_OS_WINDOWS return GetCurrentThreadId(); #elif defined NL_OS_UNIX - return uint(pthread_self()); + return size_t(pthread_self()); // doesnt work on linux kernel 2.6 return getpid(); #endif diff -r eeca1427ce51 code/nel/src/sound/CMakeLists.txt --- a/code/nel/src/sound/CMakeLists.txt Fri May 07 10:10:55 2010 +0200 +++ b/code/nel/src/sound/CMakeLists.txt Mon May 10 15:47:44 2010 +0200 @@ -1,4 +1,4 @@ -FILE(GLOB SRC *.cpp *.h) +FILE(GLOB SRC *.cpp *.h driver/sound_driver.cpp driver/buffer.cpp) IF(NOT WIN32) ADD_LIBRARY(nelsound SHARED ${SRC}) diff -r eeca1427ce51 code/nel/src/sound/driver/openal/stdopenal.h --- a/code/nel/src/sound/driver/openal/stdopenal.h Fri May 07 10:10:55 2010 +0200 +++ b/code/nel/src/sound/driver/openal/stdopenal.h Mon May 10 15:47:44 2010 +0200 @@ -31,8 +31,13 @@ #include #include -#include -#include +#ifndef NL_OS_MAC +# include +# include +#else +# include +# include +#endif #include #include