-
Notifications
You must be signed in to change notification settings - Fork 3
/
CMakeLists.txt
executable file
·254 lines (224 loc) · 11.9 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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
cmake_minimum_required(VERSION 3.10.3)
project(Elektron-SDK-BinaryPack VERSION 1.3.1.0)
set(Elektron-SDK-BinaryPack_CMAKE_DIR "${Elektron-SDK-BinaryPack_SOURCE_DIR}/CMake")
list(APPEND CMAKE_MODULE_PATH "${Elektron-SDK-BinaryPack_CMAKE_DIR}")
set(CMAKE_DEBUG_TARGET_PROPERTIES TRUE)
include(rcdevEnvironment)
include(rcdevSupport)
DEBUG_PRINT(Elektron-SDK-BinaryPack_OUTPUT_DIRECTORY)
if (Elektron-SDK-BinaryPack_OUTPUT_DIRECTORY)
set(_root_dir "${Elektron-SDK-BinaryPack_OUTPUT_DIRECTORY}")
else()
set(_root_dir "${CMAKE_SOURCE_DIR}")
endif()
# Because of some legacy static path definitions,
# the suffix of the root paths for libs and includes are
# not dynamicly defined. Future releases will hope to
# move to having fully dynamic defined locations for libs
# and header paths within the bianry pack.
# The default values are relative, well-known paths.
set(_dacs_include_root "Cpp-C/Eta/Utils/Dacs/Include")
set(_ansi_include_root "Cpp-C/Eta/Utils/Ansi/Include")
set(_vacache_include_root "Cpp-C/Eta/Include/Cache")
set(_dacs_lib_root "${_root_dir}/Cpp-C/Eta/Utils/Dacs/Libs")
set(_ansi_lib_root "${_root_dir}/Cpp-C/Eta/Utils/Ansi/Libs")
set(_vacache_lib_root "${_root_dir}/Cpp-C/Eta/Libs")
set(_header_suffix ${_dacs_include_root})
find_path(Elektron-SDK-BinaryPack_dacs_INCLUDE_DIRS
NAMES dacs_lib.h
PATHS ${_header_suffix}
DOC "Dacs library Include path"
)
set(_header_suffix ${_ansi_include_root})
find_path(Elektron-SDK-BinaryPack_ansi_INCLUDE_DIRS
NAMES ansi/ansi_int.h dev/platform.h
PATHS ${_header_suffix}
DOC "Ansi library Include path"
#PATH_SUFFIXES ansi dev
)
set(_header_suffix ${_vacache_include_root})
find_path(Elektron-SDK-BinaryPack_rsslVACache_INCLUDE_DIRS
NAMES rtr/rsslCacheDefs.h
PATHS ${_header_suffix}
DOC "Rssl Value Add Cache library Include path"
#PATH_SUFFIXES rtr
)
set(Elektron-SDK-BinaryPack_INCLUDE_DIRS "${Elektron-SDK-BinaryPack_dacs_INCLUDE_DIRS}"
"${Elektron-SDK-BinaryPack_ansi_INCLUDE_DIRS}"
"${Elektron-SDK-BinaryPack_rsslVACache_INCLUDE_DIRS}"
"${Elektron-SDK-BinaryPack_DIR}"
)
mark_as_advanced(Elektron-SDK-BinaryPack_DIR
Elektron-SDK-BinaryPack_dacs_INCLUDE_DIRS
Elektron-SDK-BinaryPack_ansi_INCLUDE_DIRS
Elektron-SDK-BinaryPack_rsslVACache_INCLUDE_DIRS
)
set(_plat_suffix)
set(_plat_suffix2)
if ( CMAKE_HOST_UNIX )
# Run the LinuxSoLink to generate binary version and .so links
execute_process(COMMAND ./LinuxSoLink
RESULT_VARIABLE _ret_val
WORKING_DIRECTORY "${Elektron-SDK-BinaryPack_SOURCE_DIR}"
)
# Because of some legacy static path definitions, some paths
# have GCC and/or OL6 in place of GNU and/or RHEL6. So in order to support
# old past haunts, hints will be added in case past wrongs
# are corrected
rcdev_get_platform_suffix(_plat_suffix)
if ( RCDEV_HOST_SYSTEM_FLAVOR_U MATCHES "ORACLE"
AND RCDEV_HOST_SYSTEM_FLAVOR_REL EQUAL 6 )
rcdev_get_platform_suffix(_plat_suffix2 "gcc" "rhel")
elseif (((RCDEV_HOST_SYSTEM_FLAVOR_U MATCHES "CENTOS") OR
(RCDEV_HOST_SYSTEM_FLAVOR_U MATCHES "REDHATLINUX")) AND
(RCDEV_HOST_SYSTEM_FLAVOR_REL EQUAL 7) )
rcdev_get_platform_suffix(_plat_suffix2 "gcc" "centOS")
else()
rcdev_get_platform_suffix(_plat_suffix2 "gcc" )
endif()
set(_hints "${_dacs_lib_root}/${_plat_suffix}/Optimized"
"${_dacs_lib_root}/${_plat_suffix2}/Optimized")
DEBUG_PRINT(::MESSAGE "${PROJECT_NAME}: Looking for dacs in :"
"${_hints}")
find_library(Elektron-SDK-BinaryPack_dacs_LIBRARY dacs
PATHS ${_hints}
DOC "DACS library from Elektron-SDK-BinaryPack"
NO_SYSTEM_ENVIRONMENT_PATH NO_DEFAULT_PATH)
set(_hints "${_ansi_lib_root}/${_plat_suffix}/Optimized"
"${_ansi_lib_root}/${_plat_suffix2}/Optimized")
DEBUG_PRINT(::MESSAGE "${PROJECT_NAME}: Looking for ansi in : "
"${_hints}")
find_library(Elektron-SDK-BinaryPack_ansi_LIBRARY ansi
PATHS ${_hints}
DOC "Ansi library from Elektron-SDK-BinaryPack"
NO_SYSTEM_ENVIRONMENT_PATH NO_DEFAULT_PATH)
# For UNIX, when not crosscompiling, we only need to handle the current
# build config type and not all possible config types
set(_hints "${_vacache_lib_root}/${_plat_suffix}/${CMAKE_BUILD_TYPE}"
"${_vacache_lib_root}/${_plat_suffix2}/${CMAKE_BUILD_TYPE}")
DEBUG_PRINT(::MESSAGE "${PROJECT_NAME}: Looking for rsslVACache in : ${_hints}")
find_library(Elektron-SDK-BinaryPack_rsslVACache_LIBRARY rsslVACache
PATHS ${_hints}
DOC "Rssl Value Add Cache library from Elektron-SDK-BinaryPack"
NO_SYSTEM_ENVIRONMENT_PATH NO_DEFAULT_PATH)
# For UNIX, when not crosscompiling, we only need to handle the current
# build config type and not all possible config types
set(_hints "${_vacache_lib_root}/${_plat_suffix}/${CMAKE_BUILD_TYPE}/Shared"
"${_vacache_lib_root}/${_plat_suffix2}/${CMAKE_BUILD_TYPE}/Shared")
DEBUG_PRINT(::MESSAGE "${PROJECT_NAME}: Looking for rsslVACache_shared in : "
"${_hints}")
find_library(Elektron-SDK-BinaryPack_rsslVACache_shared_LIBRARY rsslVACache
PATHS ${_hints}
DOC "Rssl Value Add Cache shared library from Elektron-SDK-BinaryPack"
NO_SYSTEM_ENVIRONMENT_PATH NO_DEFAULT_PATH)
DEBUG_PRINT(::MESSAGE "
IN ${CMAKE_CURRENT_LIST_DIR}
Elektron-SDK-BinaryPack_
dacs_LIBRARY : ${Elektron-SDK-BinaryPack_dacs_LIBRARY}
ansi_LIBRARY : ${Elektron-SDK-BinaryPack_ansi_LIBRARY}
rsslVACache_static_LIBRARY : ${Elektron-SDK-BinaryPack_rsslVACache_LIBRARY}
rsslVACache_shared_LIBRARY : ${Elektron-SDK-BinaryPack_rsslVACache_shared_LIBRARY}
")
mark_as_advanced(Elektron-SDK-BinaryPack_dacs_LIBRARY
Elektron-SDK-BinaryPack_ansi_LIBRARY
Elektron-SDK-BinaryPack_rsslVACache_LIBRARY
Elektron-SDK-BinaryPack_rsslVACache_shared_LIBRARY
)
string(TOUPPER ${CMAKE_BUILD_TYPE} _CONFIG_TYPE_U)
else() # if (WIN32)
rcdev_get_platform_suffix(_plat_suffix)
list(APPEND _config_type_list Debug_MDd Release_MD)
foreach(_cType IN LISTS _config_type_list)
string(TOUPPER ${_cType} _cType_U)
set(_hint "${_dacs_lib_root}/${_plat_suffix}/${_cType}")
DEBUG_PRINT(::MESSAGE "${PROJECT_NAME}: Looking for dacs in : "
"${_hint}")
find_library(Elektron-SDK-BinaryPack_dacs_LIBRARY_${_cType_U}
NAMES dacs libdacs
HINTS ${_hint}
DOC "DACS ${_cType} library from Elektron-SDK-BinaryPack"
NO_SYSTEM_ENVIRONMENT_PATH NO_DEFAULT_PATH)
set(_hint "${_ansi_lib_root}/${_plat_suffix}/${_cType}")
DEBUG_PRINT(::MESSAGE "${PROJECT_NAME}: Looking for ansi in : "
"${_hint}")
find_library(Elektron-SDK-BinaryPack_ansi_LIBRARY_${_cType_U}
NAMES ansi libansi
HINTS ${_hint}
DOC "Ansi ${_cType} library from Elektron-SDK-BinaryPack"
NO_SYSTEM_ENVIRONMENT_PATH NO_DEFAULT_PATH)
set(_hint "${_vacache_lib_root}/${_plat_suffix}/${_cType}")
DEBUG_PRINT(::MESSAGE "${PROJECT_NAME}: Looking for rsslVACache in : ${_hint}")
find_library(Elektron-SDK-BinaryPack_rsslVACache_LIBRARY_${_cType_U}
NAMES rsslVACache librsslVACache
HINTS ${_hint}
DOC "Rssl Value Add Cache ${_cType} library from Elektron-SDK-BinaryPack"
NO_SYSTEM_ENVIRONMENT_PATH NO_DEFAULT_PATH)
set(_hint "${_vacache_lib_root}/${_plat_suffix}/${_cType}/Shared")
DEBUG_PRINT(::MESSAGE "${PROJECT_NAME}: Looking for rsslVACache_shared in : "
"${_hint}")
find_library(Elektron-SDK-BinaryPack_rsslVACache_shared_LIBRARY_${_cType_U}
NAMES rsslVACache librsslVACache NAMES_PER_DIR
HINTS ${_hint}
DOC "Rssl Value Add Cache shared ${_cType} library from Elektron-SDK-BinaryPack"
NO_SYSTEM_ENVIRONMENT_PATH NO_DEFAULT_PATH)
set(CMAKE_FIND_LIBRARY_SUFFIXES ".dll")
set(_hint "${_vacache_lib_root}/${_plat_suffix}/${_cType}/Shared")
DEBUG_PRINT(::MESSAGE "${PROJECT_NAME}: Looking for rsslVACache_shared_DLL in : "
"${_hint}")
find_library(Elektron-SDK-BinaryPack_rsslVACache_shared_DLL_LIBRARY_${_cType_U}
NAMES rsslVACache librsslVACache NAMES_PER_DIR
HINTS ${_hint}
DOC "Rssl Value Add Cache shared ${_cType} library from Elektron-SDK-BinaryPack"
NO_SYSTEM_ENVIRONMENT_PATH NO_DEFAULT_PATH)
set(CMAKE_FIND_LIBRARY_SUFFIXES ".lib")
endforeach()
DEBUG_PRINT(::MESSAGE "
IN ${CMAKE_CURRENT_LIST_DIR}
Elektron-SDK-BinaryPack_
dacs_LIBRARY_DEBUG_MDD : ${Elektron-SDK-BinaryPack_dacs_LIBRARY_DEBUG_MDD}
dacs_LIBRARY_RELEASE_MD : ${Elektron-SDK-BinaryPack_dacs_LIBRARY_RELEASE_MD}
ansi_LIBRARY_DEBUG_MDD : ${Elektron-SDK-BinaryPack_ansi_LIBRARY_DEBUG_MDD}
ansi_LIBRARY_RELEASE_MD : ${Elektron-SDK-BinaryPack_ansi_LIBRARY_RELEASE_MD}
rsslVACache_static_LIBRARY_DEBUG_MDD : ${Elektron-SDK-BinaryPack_rsslVACache_LIBRARY_DEBUG_MDD}
rsslVACache_static_LIBRARY_RELEASE_MD : ${Elektron-SDK-BinaryPack_rsslVACache_LIBRARY_RELEASE_MD}
rsslVACache_shared_LIBRARY_DEBUG_MDD : ${Elektron-SDK-BinaryPack_rsslVACache_shared_LIBRARY_DEBUG_MDD}
rsslVACache_shared_DLL_LIBRARY_DEBUG_MDD: ${Elektron-SDK-BinaryPack_rsslVACache_shared_DLL_LIBRARY_DEBUG_MDD}
rsslVACache_shared_LIBRARY_RELEASE_MD : ${Elektron-SDK-BinaryPack_rsslVACache_shared_LIBRARY_RELEASE_MD}
rsslVACache_shared_DLL_LIBRARY_RELEASE_MD: ${Elektron-SDK-BinaryPack_rsslVACache_shared_DLL_LIBRARY_RELEASE_MD}
")
mark_as_advanced(Elektron-SDK-BinaryPack_dacs_LIBRARY_DEBUG_MDD
Elektron-SDK-BinaryPack_dacs_LIBRARY_RELEASE_MD
Elektron-SDK-BinaryPack_ansi_LIBRARY_DEBUG_MDD
Elektron-SDK-BinaryPack_ansi_LIBRARY_RELEASE_MD
Elektron-SDK-BinaryPack_rsslVACache_LIBRARY_DEBUG_MDD
Elektron-SDK-BinaryPack_rsslVACache_LIBRARY_RELEASE_MD
Elektron-SDK-BinaryPack_rsslVACache_shared_LIBRARY_DEBUG_MDD
Elektron-SDK-BinaryPack_rsslVACache_shared_LIBRARY_RELEASE_MD
Elektron-SDK-BinaryPack_rsslVACache_shared_DLL_LIBRARY_DEBUG_MDD
Elektron-SDK-BinaryPack_rsslVACache_shared_DLL_LIBRARY_RELEASE_MD
)
endif()
# Configuration
set(_config_dir "${CMAKE_INSTALL_PREFIX}/lib/cmake/${PROJECT_NAME}")
file(MAKE_DIRECTORY "${CMAKE_INSTALL_PREFIX}/lib/cmake" "${_config_dir}")
configure_file("${Elektron-SDK-BinaryPack_CMAKE_DIR}/${PROJECT_NAME}Targets.cmake.in"
"${_config_dir}/${PROJECT_NAME}Targets.cmake" @ONLY )
configure_file( "${Elektron-SDK-BinaryPack_CMAKE_DIR}/${PROJECT_NAME}Config.cmake.in"
"${_config_dir}/${PROJECT_NAME}Config.cmake" @ONLY)
configure_file( "${Elektron-SDK-BinaryPack_CMAKE_DIR}/${PROJECT_NAME}ConfigVersion.cmake.in"
"${_config_dir}/${PROJECT_NAME}ConfigVersion.cmake" @ONLY)
unset(_header_suffix)
unset(_plat_suffix)
unset(_plat_suffix2)
unset(_hints)
unset(_cType)
unset(_config_dir)
unset(_config_type_list)
unset(_cType_U)
unset(_CONFIG_TYPE_U)
unset(_dacs_include_root)
unset(_ansi_include_root)
unset(_vacache_include_root)
unset(_dacs_lib_root)
unset(_ansi_lib_root)
unset(_vacache_lib_root)