/
CMakeLists.txt
110 lines (99 loc) · 2.23 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
105
106
107
108
109
###############################################################################
INCLUDE(${CMAKE_CURRENT_LIST_DIR}/../../cmake/CMakeEnvironment.txt)
MESSAGE("####################################")
MESSAGE("##### Building POL - CLIB")
MESSAGE("####################################")
###############################################################################
# define source files
SET (SOURCES # sorted !
../../lib/format/format.cc #TODO: cleanup for this hack
Header_Windows.h #no auto-detect
Debugging/ExceptionParser.cpp
Debugging/LogSink.cpp
Program/ProgramConfig.cpp
Program/ProgramMain.cpp
binaryfile.cpp
boostutils.cpp
cfgfile.cpp
cfgsect.cpp
clib_MD5.cpp
clib_utils.cpp
cmdargs.cpp
dirlist.cpp
esignal.cpp
fdump.cpp
filecont.cpp
fileutil.cpp
iohelp.cpp
kbhit.cpp
logfacility.cpp
mlog.cpp
opnew.cpp
passert.cpp
pkthelper.cpp
random.cpp
sckutil.cpp
socketsvc.cpp
stracpy.cpp
streamsaver.cpp
#strexcpt.cpp #TODO: remove as default?
strset.cpp
strutil.cpp
threadhelp.cpp
timer.cpp
tracebuf.cpp
wallclock.cpp
wnsckt.cpp
xmain.cpp
)
IF(WINDOWS)
SET (SOURCES # sorted !
${SOURCES}
../../lib/StackWalker/StackWalker.cpp #TODO: cleanup for this hack
mdump.cpp
msjexhnd.cpp
strexcpt.cpp
)
ENDIF()
##############################################################
# include dirs
SET (INCLUDE_DIRS
../..
../
./
./Debugging
./Program
)
##############################################################
# set directory for internal libs
SET (LIB_DIRS
${LIB_DIRS}
${CMAKE_CURRENT_LIST_DIR}/../bin
)
##############################################################
# Linux specific dependencies
SET (LIBS_LINUX
crypto
pthread
)
##############################################################
# Windows specific dependencies
SET (LIBS_WINDOWS
ws2_32
Psapi
DbgHelp
# crypto
)
##############################################################
# define target directory
SET (TARGET_DIRECTORY
${CMAKE_CURRENT_LIST_DIR}/../bin
)
##############################################################
# define binary name
SET (TARGET_LIB_NAME
clib
)
##############################################################
# include CMake core
INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/../../cmake/CMakeCore.txt)