mirror of
https://github.com/EQEmu/Server.git
synced 2026-01-06 01:03:52 +00:00
134 lines
2.5 KiB
CMake
134 lines
2.5 KiB
CMake
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
|
|
|
|
SET(libuv_sources
|
|
src/fs-poll.c
|
|
src/inet.c
|
|
src/threadpool.c
|
|
src/uv-common.c
|
|
src/version.c
|
|
)
|
|
|
|
SET(libuv_headers
|
|
include/uv.h
|
|
include/tree.h
|
|
include/uv-errno.h
|
|
include/uv-threadpool.h
|
|
include/uv-version.h
|
|
src/heap-inl.h
|
|
src/queue.h
|
|
src/uv-common.h
|
|
)
|
|
|
|
IF(NOT WIN32)
|
|
ADD_DEFINITIONS(-D_LARGEFILE_SOURCE)
|
|
ADD_DEFINITIONS(-D_FILE_OFFSET_BITS=64)
|
|
|
|
SET(libuv_sources ${libuv_sources}
|
|
src/unix/async.c
|
|
src/unix/core.c
|
|
src/unix/dl.c
|
|
src/unix/fs.c
|
|
src/unix/getaddrinfo.c
|
|
src/unix/getnameinfo.c
|
|
src/unix/loop.c
|
|
src/unix/loop-watcher.c
|
|
src/unix/pipe.c
|
|
src/unix/poll.c
|
|
src/unix/process.c
|
|
src/unix/signal.c
|
|
src/unix/stream.c
|
|
src/unix/tcp.c
|
|
src/unix/thread.c
|
|
src/unix/timer.c
|
|
src/unix/tty.c
|
|
src/unix/udp.c
|
|
)
|
|
|
|
SET(libuv_headers ${libuv_headers}
|
|
include/uv-unix.h
|
|
include/uv-linux.h
|
|
include/uv-sunos.h
|
|
include/uv-darwin.h
|
|
include/uv-bsd.h
|
|
include/uv-aix.h
|
|
src/unix/atomic-ops.h
|
|
src/unix/internal.h
|
|
src/unix/spinlock.h
|
|
)
|
|
|
|
IF(CMAKE_SYSTEM_NAME STREQUAL Linux)
|
|
ADD_DEFINITIONS(-D_POSIX_C_SOURCE=200112)
|
|
ADD_DEFINITIONS(-D_GNU_SOURCE)
|
|
|
|
SET(libuv_sources ${libuv_sources}
|
|
src/unix/proctitle.c
|
|
src/unix/linux-core.c
|
|
src/unix/linux-inotify.c
|
|
src/unix/linux-syscalls.c
|
|
)
|
|
|
|
SET(libuv_headers ${libuv_headers}
|
|
src/unix/linux-syscalls.h
|
|
)
|
|
ENDIF()
|
|
|
|
IF(APPLE)
|
|
ADD_DEFINITIONS(-D_DARWIN_USE_64_BIT_INODE=1)
|
|
ADD_DEFINITIONS(-D_DARWIN_UNLIMITED_SELECT=1)
|
|
|
|
SET(libuv_sources ${libuv_sources}
|
|
src/unix/proctitle.c
|
|
src/unix/darwin.c
|
|
src/unix/fsevents.c
|
|
src/unix/darwin-proctitle.c
|
|
src/unix/pthread-barrier.c
|
|
src/unix/kqueue.c
|
|
)
|
|
ENDIF()
|
|
ELSE()
|
|
ADD_DEFINITIONS(-D_WIN32_WINNT=0x0600)
|
|
ADD_DEFINITIONS(-D_GNU_SOURCE)
|
|
|
|
SET(libuv_sources ${libuv_sources}
|
|
src/win/async.c
|
|
src/win/core.c
|
|
src/win/dl.c
|
|
src/win/error.c
|
|
src/win/fs.c
|
|
src/win/fs-event.c
|
|
src/win/getaddrinfo.c
|
|
src/win/getnameinfo.c
|
|
src/win/handle.c
|
|
src/win/loop-watcher.c
|
|
src/win/pipe.c
|
|
src/win/thread.c
|
|
src/win/poll.c
|
|
src/win/process.c
|
|
src/win/process-stdio.c
|
|
src/win/req.c
|
|
src/win/signal.c
|
|
src/win/snprintf.c
|
|
src/win/stream.c
|
|
src/win/tcp.c
|
|
src/win/tty.c
|
|
src/win/timer.c
|
|
src/win/udp.c
|
|
src/win/util.c
|
|
src/win/winapi.c
|
|
src/win/winsock.c
|
|
)
|
|
|
|
SET(libuv_headers ${libuv_headers}
|
|
include/uv-win.h
|
|
src/win/atomicops-inl.h
|
|
src/win/handle-inl.h
|
|
src/win/internal.h
|
|
src/win/req-inl.h
|
|
src/win/stream-inl.h
|
|
src/win/winapi.h
|
|
src/win/winsock.h
|
|
)
|
|
ENDIF()
|
|
|
|
ADD_LIBRARY(libuv ${libuv_sources} ${libuv_headers})
|