CMakeLists.txt
1.4 KB
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
option(WITH_LibEvent "Use LibEvent" ON)
########################################################
# Files
SET(spserver_SOURCES
event_msgqueue.c
spbuffer.cpp
spdispatcher.cpp
speventcb.cpp
spexecutor.cpp
sphandler.cpp
sphttp.cpp
sphttpmsg.cpp
spiochannel.cpp
spioutils.cpp
splfserver.cpp
spmsgblock.cpp
spmsgdecoder.cpp
sprequest.cpp
spresponse.cpp
spserver.cpp
spsession.cpp
spsmtp.cpp
spthreadpool.cpp
sputils.cpp
)
SET(spserver_HEADERS
event_msgqueue.h
spbuffer.hpp
spdispatcher.hpp
speventcb.hpp
spexecutor.hpp
sphandler.hpp
sphttp.hpp
sphttpmsg.hpp
spiochannel.hpp
spioutils.hpp
splfserver.hpp
spmsgblock.hpp
spmsgdecoder.hpp
spporting.hpp
sprequest.hpp
spresponse.hpp
spserver.hpp
spsession.hpp
spsmtp.hpp
spthreadpool.hpp
sputils.hpp
)
#############################################################
add_library(spserver SHARED ${spserver_SOURCES} ${spserver_HEADERS})
if(WITH_LibEvent)
find_package(LibEvent)
if(LibEvent_FOUND)
include_directories(${LibEvent_INCLUDE_DIR})
target_link_libraries(spserver ${LIBEVENT_LIB})
set (USE_LibEvent 1)
else(LibEvent_FOUND)
MESSAGE (SEND_ERROR "LibEvent dependency was not found!")
endif(LibEvent_FOUND)
endif (WITH_LibEvent)
INSTALL(TARGETS spserver
RUNTIME DESTINATION ${DMAP_BIN_DIR}
LIBRARY DESTINATION ${DMAP_LIB_DIR}
ARCHIVE DESTINATION ${DMAP_LIB_DIR}
PUBLIC_HEADER DESTINATION ${DMAP_INCLUDE_DIR}
)