-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
126 lines (94 loc) · 3.38 KB
/
CMakeLists.txt
File metadata and controls
126 lines (94 loc) · 3.38 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
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
PROJECT(libcpputil)
SET(BUILD_SHARED_LIBS ON)
SET(CMAKE_BUILD_TYPE DEBUG)
IF(CMAKE_COMPILER_IS_GNUCXX)
SET(CMAKE_CXX_FLAGS_DEBUG "-g3")
ENDIF(CMAKE_COMPILER_IS_GNUCXX)
SET(CMAKE_CXX_FLAGS "-DTIXML_USE_TICPP")
SET(CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined -fPIC")
ADD_LIBRARY(cpputil
src/Functions.cpp
src/Time.cpp
src/Date.cpp
src/Mutex.cpp
src/SimpleException.cpp
src/Thread.cpp
src/LockedCondition.cpp
src/network/ServerSocketTCP.cpp
src/network/SocketTCP.cpp
src/logger/Loggable.cpp
src/logger/Logger.cpp
src/logger/LoggerColor.cpp
src/logger/LoggerDefault.cpp
src/logger/LoggerLogFile.cpp
src/logger/LoggerManager.cpp
src/logger/LoggerNetworkStream.cpp
src/logger/LoggerXmlParser.cpp
ticpp/ticpp.cpp
ticpp/tinystr.cpp
ticpp/tinyxml.cpp
ticpp/tinyxmlerror.cpp
ticpp/tinyxmlparser.cpp)
SET(install_headers
include/Functions.h
include/Date.h
include/Time.h
include/SimpleException.h
include/IllegalParameterException.h
include/InitializationException.h
include/NotImplementedException.h
include/Thread.h
include/Mutex.h
include/ThreadExceptionListener.h
include/LockedCondition.h)
SET(install_headers_logger
include/logger/Loggable.h
include/logger/LoggerDefault.h
include/logger/LoggerManager.h
include/logger/Logger.h
include/logger/LoggerXmlParser.h
include/logger/LoggerException.h
include/logger/LoggerLogFile.h
include/logger/LoggerNetworkStream.h
include/logger/LoggerColor.h)
SET(install_headers_ticpp
ticpp/ticpp.h
ticpp/ticpprc.h
ticpp/tinystr.h
ticpp/tinyxml.h)
SET(install_headers_network
include/network/NetworkException.h
include/network/ServerSocketTCP.h
include/network/SocketTCP.h)
TARGET_LINK_LIBRARIES (cpputil pthread uuid)
LINK_DIRECTORIES (${libcpputil_BINARY_DIR})
INCLUDE_DIRECTORIES (${libcpputil_SOURCE_DIR}/include)
ADD_EXECUTABLE(exceptionTest test/exceptionTest.cpp)
TARGET_LINK_LIBRARIES (exceptionTest cpputil)
ADD_EXECUTABLE(loggerTest test/loggerTest.cpp)
TARGET_LINK_LIBRARIES (loggerTest cpputil)
ADD_EXECUTABLE(LoggerServer test/LoggerServer.cpp)
TARGET_LINK_LIBRARIES (LoggerServer cpputil)
ADD_EXECUTABLE(socketClientTest test/socketClientTest.cpp)
TARGET_LINK_LIBRARIES (socketClientTest cpputil)
ADD_EXECUTABLE(socketServerTest test/socketServerTest.cpp)
TARGET_LINK_LIBRARIES (socketServerTest cpputil)
ADD_EXECUTABLE(uuidTest test/uuidTest.cpp)
TARGET_LINK_LIBRARIES (uuidTest cpputil)
ADD_EXECUTABLE(enumTest test/enumTest.cpp)
TARGET_LINK_LIBRARIES (enumTest cpputil)
ADD_EXECUTABLE(xmlBuilderTest test/xmlBuilderTest.cpp)
TARGET_LINK_LIBRARIES (xmlBuilderTest cpputil)
ADD_EXECUTABLE(stringTest test/stringTest.cpp)
TARGET_LINK_LIBRARIES (stringTest cpputil)
ADD_EXECUTABLE(exceptionThreadTest test/exceptionThreadTest.cpp)
TARGET_LINK_LIBRARIES (exceptionThreadTest cpputil)
ADD_EXECUTABLE(dateTimeTest test/dateTimeTest.cpp)
TARGET_LINK_LIBRARIES (dateTimeTest cpputil)
INSTALL (TARGETS cpputil LIBRARY DESTINATION lib)
# INSTALL (TARGETS cpputil ARCHIVE DESTINATION lib)
INSTALL (FILES ${install_headers} DESTINATION include/libcpputil)
INSTALL (FILES ${install_headers_ticpp} DESTINATION include/ticpp)
INSTALL (FILES ${install_headers_logger} DESTINATION include/libcpputil/logger)
INSTALL (FILES ${install_headers_network} DESTINATION include/libcpputil/network)