-
Notifications
You must be signed in to change notification settings - Fork 6
/
CMakeLists.txt
48 lines (39 loc) · 974 Bytes
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
cmake_minimum_required(VERSION 2.8)
project(MogNetwork)
set(CMAKE_BUILD_TYPE Release)
set(CMAKE_CXX_FLAGS "-g3 -W -Wall -pedantic -ansi -fPIC")
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include)
set(SOURCES
src/AProtocolListener.cpp
src/BinaryProtocol.cpp
src/TextProtocol.cpp
src/UnixCondVar.cpp
src/WinCondVar.cpp
src/IpAddress.cpp
src/WinMutex.cpp
src/UnixMutex.cpp
src/Packet.cpp
src/Selector.cpp
src/Socket.cpp
src/TcpASIOServer.cpp
src/TcpASIOListener.cpp
src/TcpASIOWriter.cpp
src/TcpServerSocket.cpp
src/TcpSocket.cpp
src/UnixThread.cpp
src/WinThread.cpp
src/UnixSocket.cpp
src/WinSocket.cpp
)
add_library(mognetwork SHARED
${SOURCES}
)
add_library(mognetwork-static STATIC
${SOURCES}
)
if(WIN32)
target_link_libraries(mognetwork wsock32 ws2_32)
target_link_libraries(mognetwork-static wsock32 ws2_32)
endif()
install(TARGETS mognetwork DESTINATION lib)
install(DIRECTORY include DESTINATION .)