-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
133 lines (112 loc) · 3.12 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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
cmake_minimum_required (VERSION 2.6)
PROJECT(mmdd C CXX)
include_directories( ./source/include/ )
include_directories( ${CMAKE_INSTALL_PREFIX}/include/fedlibrary/include )
IF(NOT CMAKE_BUILD_TYPE )
SET(CMAKE_BUILD_TYPE Release CACHE STRING
"Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel."
FORCE)
ENDIF()
IF( CMAKE_BUILD_TYPE STREQUAL "Debug" )
set( MMDD_VERSION
-debug
)
set( MMDC_VERSION
-debug
)
set( MMDE_VERSION
-debug
)
set( FEDLIB_VER
-3.2.0-static-debug
)
ELSE()
set( MMDD_VERSION
)
set( MMDC_VERSION
)
set( MMDE_VERSION
)
set( FEDLIB_VER
-3.2.0-static
)
ENDIF()
option (MMDD_EXEC_SUPPORT "Support Exec commands" OFF)
if (MMDD_EXEC_SUPPORT)
add_definitions( -D_MMDD_EXEC_ENABLED )
endif (MMDD_EXEC_SUPPORT)
set( MMDD_INCLUDE
./source/include/Mmdd.h
./source/include/MmddConfig.h
./source/include/MmddConfigException.h
./source/include/MmddEvents.h
./source/include/crc/crc-ccitt.h
./source/include/crc/lib_crc.h
./source/include/proto/mmd_proto.h
)
set( MMDD_SRC
./source/src/main.cpp
./source/src/Mmdd.cpp
./source/src/MmddConfig.cpp
./source/src/MmddConfigException.cpp
./source/src/MmddEvents.cpp
./source/src/crc/crc-ccitt.c
./source/src/crc/lib_crc.c
)
set( MMDC_INCLUDE
./source/include/crc/crc-ccitt.h
./source/include/crc/lib_crc.h
./source/include/proto/mmd_proto.h
)
set( MMDE_INCLUDE
./source/include/crc/crc-ccitt.h
./source/include/crc/lib_crc.h
./source/include/proto/mmd_proto.h
)
set( MMDC_SRC
./source/src/mmdc.cpp
./source/src/crc/crc-ccitt.c
./source/src/crc/lib_crc.c
)
set( MMDE_SRC
./source/src/mmde.cpp
./source/src/crc/crc-ccitt.c
./source/src/crc/lib_crc.c
)
set( MMDD_LIBRARIES
fedlibrary${FEDLIB_VER}
pthread
)
set( MMDC_LIBRARIES
fedlibrary${FEDLIB_VER}
pthread
)
set( MMDE_LIBRARIES
fedlibrary${FEDLIB_VER}
pthread
)
IF( CMAKE_BUILD_TYPE STREQUAL "Debug" )
add_definitions(
-ggdb3
)
ENDIF()
add_definitions(
-Wall
-std=c++0x
-D__STDC_CONSTANT_MACROS
-D_NO_FED_NAMESPACE
-D_TRACING_EXCEPTION_RAISE
-D_TRACING_EXCEPTION_CATCH
-D_ENABLE_ERROR_INFO
-D_ENABLE_LOG_INFO
-D_ENABLE_RAW_INFO
-D_ENABLE_METHOD_TRACING
-D_ENABLE_VERBOSE_INFO
-D_ENABLE_ASSERTION_TRACING
)
add_executable( mmdd${MMDD_VERSION} ${MMDD_SRC} )
add_executable( mmdc${MMDC_VERSION} ${MMDC_SRC} )
add_executable( mmde${MMDE_VERSION} ${MMDE_SRC} )
target_link_libraries( mmdd${MMDD_VERSION} ${MMDD_LIBRARIES} )
target_link_libraries( mmdc${MMDC_VERSION} ${MMDC_LIBRARIES} )
target_link_libraries( mmde${MMDE_VERSION} ${MMDE_LIBRARIES} )