Changes for intel Mac OSX build

This commit is contained in:
Corysia Taware 2014-04-03 14:10:03 -07:00
parent bb541eeb60
commit f6046477b4
13 changed files with 39 additions and 11 deletions

View File

@ -99,6 +99,10 @@ IF(UNIX)
ADD_DEFINITIONS(-DFREEBSD)
SET(FREEBSD TRUE)
ENDIF(CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
IF(CMAKE_SYSTEM_NAME MATCHES "Darwin")
ADD_DEFINITIONS(-DDARWIN)
SET(DARWIN TRUE)
ENDIF(CMAKE_SYSTEM_NAME MATCHES "Darwin")
ENDIF(UNIX)
#use stdint.h types if they exist for this platform (we have to guess otherwise)

View File

@ -26,7 +26,9 @@ IF(UNIX)
TARGET_LINK_LIBRARIES(export_client_files "${CMAKE_DL_LIBS}")
TARGET_LINK_LIBRARIES(export_client_files "z")
TARGET_LINK_LIBRARIES(export_client_files "m")
TARGET_LINK_LIBRARIES(export_client_files "rt")
IF(NOT DARWIN)
TARGET_LINK_LIBRARIES(export_client_files "rt")
ENDIF(NOT DARWIN)
TARGET_LINK_LIBRARIES(export_client_files "pthread")
ADD_DEFINITIONS(-fPIC)
ENDIF(UNIX)

View File

@ -26,7 +26,9 @@ IF(UNIX)
TARGET_LINK_LIBRARIES(import_client_files "${CMAKE_DL_LIBS}")
TARGET_LINK_LIBRARIES(import_client_files "z")
TARGET_LINK_LIBRARIES(import_client_files "m")
TARGET_LINK_LIBRARIES(import_client_files "rt")
IF(NOT DARWIN)
TARGET_LINK_LIBRARIES(import_client_files "rt")
ENDIF(NOT DARWIN)
TARGET_LINK_LIBRARIES(import_client_files "pthread")
ADD_DEFINITIONS(-fPIC)
ENDIF(UNIX)

View File

@ -30,6 +30,10 @@
#ifdef FREEBSD //Timothy Whitman - January 7, 2003
#define MSG_NOSIGNAL 0
#endif
#ifdef DARWIN
#define MSG_NOSIGNAL SO_NOSIGPIPE // Corysia Taware - Sept. 27, 2013
// See http://lists.apple.com/archives/macnetworkprog/2002/Dec/msg00091.html
#endif // DARWIN
#ifdef _WINDOWS
InitWinsock winsock;

View File

@ -30,7 +30,9 @@ IF(UNIX)
TARGET_LINK_LIBRARIES(eqlaunch "${CMAKE_DL_LIBS}")
TARGET_LINK_LIBRARIES(eqlaunch "z")
TARGET_LINK_LIBRARIES(eqlaunch "m")
TARGET_LINK_LIBRARIES(eqlaunch "rt")
IF(NOT DARWIN)
TARGET_LINK_LIBRARIES(eqlaunch "rt")
ENDIF(NOT DARWIN)
TARGET_LINK_LIBRARIES(eqlaunch "pthread")
ADD_DEFINITIONS(-fPIC)
ENDIF(UNIX)

View File

@ -58,7 +58,9 @@ IF(UNIX)
TARGET_LINK_LIBRARIES(loginserver "${CMAKE_DL_LIBS}")
TARGET_LINK_LIBRARIES(loginserver "z")
TARGET_LINK_LIBRARIES(loginserver "m")
TARGET_LINK_LIBRARIES(loginserver "rt")
IF(NOT DARWIN)
TARGET_LINK_LIBRARIES(loginserver "rt")
ENDIF(NOT DARWIN)
TARGET_LINK_LIBRARIES(loginserver "pthread")
TARGET_LINK_LIBRARIES(loginserver "EQEmuAuthCrypto")
TARGET_LINK_LIBRARIES(loginserver "cryptopp")

View File

@ -36,7 +36,9 @@ IF(UNIX)
TARGET_LINK_LIBRARIES(queryserv "${CMAKE_DL_LIBS}")
TARGET_LINK_LIBRARIES(queryserv "z")
TARGET_LINK_LIBRARIES(queryserv "m")
TARGET_LINK_LIBRARIES(queryserv "rt")
IF(NOT DARWIN)
TARGET_LINK_LIBRARIES(queryserv "rt")
ENDIF(NOT DARWIN)
TARGET_LINK_LIBRARIES(queryserv "pthread")
ADD_DEFINITIONS(-fPIC)
ENDIF(UNIX)

View File

@ -38,7 +38,9 @@ IF(UNIX)
TARGET_LINK_LIBRARIES(shared_memory "${CMAKE_DL_LIBS}")
TARGET_LINK_LIBRARIES(shared_memory "z")
TARGET_LINK_LIBRARIES(shared_memory "m")
TARGET_LINK_LIBRARIES(shared_memory "rt")
IF(NOT DARWIN)
TARGET_LINK_LIBRARIES(shared_memory "rt")
ENDIF(NOT DARWIN)
TARGET_LINK_LIBRARIES(shared_memory "pthread")
ADD_DEFINITIONS(-fPIC)
ENDIF(UNIX)

View File

@ -32,7 +32,9 @@ IF(UNIX)
TARGET_LINK_LIBRARIES(tests "${CMAKE_DL_LIBS}")
TARGET_LINK_LIBRARIES(tests "z")
TARGET_LINK_LIBRARIES(tests "m")
TARGET_LINK_LIBRARIES(tests "rt")
IF(NOT DARWIN)
TARGET_LINK_LIBRARIES(loginserver "rt")
ENDIF(NOT DARWIN)
TARGET_LINK_LIBRARIES(tests "pthread")
ADD_DEFINITIONS(-fPIC)
ENDIF(UNIX)

View File

@ -38,7 +38,9 @@ IF(UNIX)
TARGET_LINK_LIBRARIES(ucs "${CMAKE_DL_LIBS}")
TARGET_LINK_LIBRARIES(ucs "z")
TARGET_LINK_LIBRARIES(ucs "m")
TARGET_LINK_LIBRARIES(ucs "rt")
IF(NOT DARWIN)
TARGET_LINK_LIBRARIES(ucs "rt")
ENDIF(NOT DARWIN)
TARGET_LINK_LIBRARIES(ucs "pthread")
ADD_DEFINITIONS(-fPIC)
ENDIF(UNIX)

View File

@ -84,7 +84,9 @@ IF(UNIX)
TARGET_LINK_LIBRARIES(world "${CMAKE_DL_LIBS}")
TARGET_LINK_LIBRARIES(world "z")
TARGET_LINK_LIBRARIES(world "m")
TARGET_LINK_LIBRARIES(world "rt")
IF(NOT DARWIN)
TARGET_LINK_LIBRARIES(world "rt")
ENDIF(NOT DARWIN)
TARGET_LINK_LIBRARIES(world "pthread")
ADD_DEFINITIONS(-fPIC)
ENDIF(UNIX)

View File

@ -56,7 +56,7 @@
#include <sys/ipc.h>
#include <sys/sem.h>
#include <sys/shm.h>
#ifndef FREEBSD
#if not defined (FREEBSD) && not defined (DARWIN)
union semun {
int val;
struct semid_ds *buf;

View File

@ -230,7 +230,9 @@ IF(UNIX)
TARGET_LINK_LIBRARIES(zone "${CMAKE_DL_LIBS}")
TARGET_LINK_LIBRARIES(zone "z")
TARGET_LINK_LIBRARIES(zone "m")
TARGET_LINK_LIBRARIES(zone "rt")
IF(NOT DARWIN)
TARGET_LINK_LIBRARIES(zone "rt")
ENDIF(NOT DARWIN)
TARGET_LINK_LIBRARIES(zone "pthread")
ADD_DEFINITIONS(-fPIC)
ENDIF(UNIX)