2011-07-24 10:29:16 -04:00
|
|
|
# CMakeLists.txt - enet
|
|
|
|
|
|
|
|
include_directories("include")
|
|
|
|
|
2013-03-14 19:10:20 -04:00
|
|
|
if(APPLE)
|
|
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -arch i386")
|
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -arch i386 -F/Library/Frameworks")
|
|
|
|
endif()
|
|
|
|
|
2011-07-24 10:29:16 -04:00
|
|
|
add_definitions(-DHAS_SOCKLEN_T)
|
|
|
|
|
2013-04-19 18:39:43 -04:00
|
|
|
add_library(enet STATIC
|
2012-03-06 15:57:35 -05:00
|
|
|
callbacks.c
|
|
|
|
compress.c
|
|
|
|
host.c
|
|
|
|
list.c
|
|
|
|
packet.c
|
|
|
|
peer.c
|
|
|
|
protocol.c
|
|
|
|
unix.c
|
|
|
|
win32.c
|
|
|
|
)
|
2012-03-10 18:16:57 -05:00
|
|
|
|
2014-09-03 08:05:34 -04:00
|
|
|
if(MINGW)
|
2015-01-08 15:46:59 -05:00
|
|
|
target_link_libraries(enet wsock32 ws2_32 winmm)
|
2014-09-03 08:05:34 -04:00
|
|
|
endif()
|
|
|
|
|
2012-03-10 18:16:57 -05:00
|
|
|
#if(WIN32)
|
|
|
|
# find_library(WS2_LIBRARY NAMES "ws2_32" PATHS "C:/Windows/System32")
|
|
|
|
# target_link_libraries(enet ${WS2_LIBRARY})
|
|
|
|
#endif()
|