forked from jan-hoelscher-mss/safmq
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
104 lines (85 loc) · 2.42 KB
/
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
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
cmake_minimum_required(VERSION 2.8)
project (safmq)
set(CMAKE_VERBOSE_MAKEFILE Off)
SET(BUILD_SHARED_LIBS Off)
include_directories (.)
include_directories (./shared)
#add_library (safmq
SET(SAFMQ_SOURCE
${SAFMQ_SOURCE}
Signal.cpp
SystemDelivery.cpp
Log.cpp
logger.cpp
DirectoryList.cpp
Mutex.cpp
QStorage.cpp
ServiceThread.cpp
QManager.cpp
ServerThread.cpp
shared/thdlib.cpp
QAccessControl.cpp
param_config.cpp
ForwardThread.cpp
TransactionManager.cpp
SystemConnection.cpp
Command.cpp
AddressParser.cpp
Stats.cpp
shared/tcpsocket/tcpsocket.cpp
lib/MQConnection.cpp
lib/MQFactory.cpp
lib/MessageQueue.cpp
)
IF(NOT WIN32)
SET(SAFMQ_SOURCE
${SAFMQ_SOURCE}
SysLogger.cpp
shared/uuidgen/uuidgen.c
)
ELSEIF(APPLE)
ELSEIF(WIN32)
SET(SAFMQ_SOURCE
${SAFMQ_SOURCE}
NTSysLogger.cpp
shared/uuidgen/uuidgenwin.c
ntservice.cpp
)
ENDIF(NOT WIN32)
add_library (safmq ${SAFMQ_SOURCE})
ADD_DEFINITIONS(-fPIC)
ADD_DEFINITIONS(-fpermissive)
IF(UNIX AND NOT APPLE)
ADD_DEFINITIONS(-DCONFIG_DIR="")
ADD_DEFINITIONS(-DCONFIG_ENV="\\"SACFG\\"")
ADD_DEFINITIONS(-DUUID_USE_INTTYPES)
ADD_DEFINITIONS(-DSAFMQ_POSIX_HWADDR)
ELSEIF(APPLE)
ADD_DEFINITIONS(-DCONFIG_DIR='\\"\\"')
ADD_DEFINITIONS(-DCONFIG_ENV="\\"SACFG\\"")
ADD_DEFINITIONS(-DUUID_USE_INTTYPES)
ELSEIF(WIN32)
SET(EXTRA_LIBS ws2_32 rpcrt4)
ADD_DEFINITIONS(-DCONFIG_DIR='\\"\\"')
ADD_DEFINITIONS(-DCONFIG_ENV="\\"SACFG\\"")
ADD_DEFINITIONS(-D_CRT_SECURE_NO_WARNINGS )
ADD_DEFINITIONS(-D_SCL_SECURE_NO_WARNINGS )
ENDIF(UNIX AND NOT APPLE)
target_link_libraries (safmq ${EXTRA_LIBS})
INSTALL(TARGETS safmq
LIBRARY DESTINATION lib
RUNTIME DESTINATION lib
ARCHIVE DESTINATION lib
)
FILE(GLOB files "${CMAKE_CURRENT_SOURCE_DIR}/*.h")
INSTALL(FILES ${files} DESTINATION include)
FILE(GLOB files "${CMAKE_CURRENT_SOURCE_DIR}/lib/*.h")
INSTALL(FILES ${files} DESTINATION include/lib)
FILE(GLOB files "${CMAKE_CURRENT_SOURCE_DIR}/shared/tcpsocket/*.h")
INSTALL(FILES ${files} DESTINATION include/shared/tcpsocket)
FILE(GLOB files "${CMAKE_CURRENT_SOURCE_DIR}/shared/*.h")
INSTALL(FILES ${files} DESTINATION include/shared)
FILE(GLOB files "${CMAKE_CURRENT_SOURCE_DIR}/shared/uuidgen/*.h")
INSTALL(FILES ${files} DESTINATION include/shared/uuidgen)
FILE(GLOB files "${CMAKE_CURRENT_SOURCE_DIR}/lib/*.h")
INSTALL(FILES ${files} DESTINATION include/lib)