diff options
author | Chuck Miller <shadowmil@gmail.com> | 2010-08-15 15:57:21 -0400 |
---|---|---|
committer | Chuck Miller <shadowmil@gmail.com> | 2010-08-15 15:57:21 -0400 |
commit | 8f573b6c425dc82be42ad80eae565b0641a90a3b (patch) | |
tree | 149c7889d384e10fd9dc95f1aa90478e69b314c8 /libs/enet/CMakeLists.txt | |
parent | fee9fbce12e620f25aecdc0690285cc47fa8791d (diff) | |
parent | 2b676bbf6fcf7dfd45cb33f06dacd2ca5bce19fe (diff) | |
download | mana-client-8f573b6c425dc82be42ad80eae565b0641a90a3b.tar.gz mana-client-8f573b6c425dc82be42ad80eae565b0641a90a3b.tar.bz2 mana-client-8f573b6c425dc82be42ad80eae565b0641a90a3b.tar.xz mana-client-8f573b6c425dc82be42ad80eae565b0641a90a3b.zip |
Merge branch '1.0'
Conflicts:
mana.cbp
mana.files
src/CMakeLists.txt
src/Makefile.am
src/utils/xml.cpp
Diffstat (limited to 'libs/enet/CMakeLists.txt')
-rw-r--r-- | libs/enet/CMakeLists.txt | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/libs/enet/CMakeLists.txt b/libs/enet/CMakeLists.txt new file mode 100644 index 00000000..714d9c03 --- /dev/null +++ b/libs/enet/CMakeLists.txt @@ -0,0 +1,55 @@ +INCLUDE(CheckFunctionExists) +CHECK_FUNCTION_EXISTS(gethostbyaddr_r HAS_GETHOSTBYNAME_R) +IF(HAS_GETHOSTBYNAME_R EQUAL 1) + SET (FLAGS "${FLAGS} -DHAS_GETHOSTBYADDR_R") +ENDIF() + +CHECK_FUNCTION_EXISTS(poll HAS_POLL) +IF(HAS_POLL EQUAL 1) + SET (FLAGS "${FLAGS} -DHAS_POLL") +ENDIF() + +CHECK_FUNCTION_EXISTS(fcntl HAS_FCNTL) +IF(HAS_FCNTL) + SET (FLAGS "${FLAGS} -DHAS_FCNTL") +ENDIF() + +CHECK_FUNCTION_EXISTS(inet_pton HAS_INETPTON) +IF(HAS_INETPTON EQUAL 1) + SET (FLAGS "${FLAGS} -DHAS_INETPTON") +ENDIF() + +CHECK_FUNCTION_EXISTS(inet_ntop HAS_INETNTOP) +IF(HAS_INETNTOP EQUAL 1) + SET (FLAGS "${FLAGS} -DHAS_INETNTOP") +ENDIF() + +INCLUDE(CheckTypeSize) +SET (CMAKE_EXTRA_INCLUDE_FILES sys/socket.h) +CHECK_TYPE_SIZE(socklen_t SOCKLEN_T) +IF(HAVE_SOCKLEN_T) + SET (FLAGS "${FLAGS} -DHAS_SOCKLEN_T") +ENDIF() + +INCLUDE(CheckStructHasMember) +CHECK_STRUCT_HAS_MEMBER("struct msghdr" msg_flags sys/socket.h HAS_MSGHDR_FLAGS) +IF(HAS_MSGHDR_FLAGS EQUAL 1) + SET (FLAGS "${FLAGS} -DHAS_MSGHDR_FLAGS") +ENDIF() + +SET (SRCS + callbacks.c + compress.c + host.c + list.c + packet.c + peer.c + protocol.c + unix.c + win32.c + ) + +INCLUDE_DIRECTORIES("include") + +ADD_LIBRARY(enet STATIC ${SRCS}) +SET_TARGET_PROPERTIES(enet PROPERTIES COMPILE_FLAGS "${FLAGS}")
\ No newline at end of file |