-
Notifications
You must be signed in to change notification settings - Fork 15
/
CMakeLists.txt
324 lines (265 loc) · 14.4 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
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
# Copyright (C) 2003-2005 Daniel Muller, dan at verliba dot cz
# Copyright (C) 2006-2024 Verlihub Team, info at verlihub dot net
#
# Verlihub is free software; You can redistribute it
# and modify it under the terms of the GNU General
# Public License as published by the Free Software
# Foundation, either version 3 of the license, or at
# your option any later version.
#
# Verlihub is distributed in the hope that it will be
# useful, but without any warranty, without even the
# implied warranty of merchantability or fitness for
# a particular purpose. See the GNU General Public
# License for more details.
#
# Please see http://www.gnu.org/licenses/ for a copy
# of the GNU General Public License.
cmake_minimum_required(VERSION 3.0)
PROJECT(VERLIHUB)
message(STATUS)
message(STATUS "You can change build options with: -D{OPTION}=ON|OFF")
message(STATUS "You can turn on debug build with: -DDEFINE_DEBUG=ON")
message(STATUS "You can disable all plugins with: -DWITH_PLUGINS=OFF")
#message(STATUS "You can disable SSL secured connects with: -DUSE_SSL_CONNECTS=OFF")
message(STATUS "NOTE: Plugins other than LUA are now DEPRECATED")
message(STATUS "You can enable or disable specific plugin with: -DWITH_{NAME}=[ON/OFF]")
message(STATUS "Plugin names: LUA PYTHON PERL FORBID CHATROOM IPLOG ISP MESSENGER STATS REPLACER FLOODPROT")
message(STATUS "If you get errors related to autosprintf, please try with: -DUSE_CUSTOM_AUTOSPRINTF=ON")
message(STATUS)
SET(VERLIHUB_VERSION_MAJOR 1) # note: these must be numbers, else compilation will fail
SET(VERLIHUB_VERSION_MINOR 5)
SET(VERLIHUB_VERSION_PATCH 0)
SET(VERLIHUB_VERSION_TWEAK 2)
SET(VERLIHUB_VERSION "${VERLIHUB_VERSION_MAJOR}.${VERLIHUB_VERSION_MINOR}.${VERLIHUB_VERSION_PATCH}.${VERLIHUB_VERSION_TWEAK}")
#SET(VERLIHUB_SOVERSION "${VERLIHUB_VERSION_MAJOR}.${VERLIHUB_VERSION_MINOR}.${VERLIHUB_VERSION_PATCH}")
SET(PROJECT_NAME "verlihub")
SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake/Modules)
SET(OK_PLUGINS_COUNT 0)
SET(ALL_PLUGINS_COUNT 12)
INCLUDE(CheckIncludeFiles)
INCLUDE(MacroLogFeature)
INCLUDE(VerlihubMacro)
OPTION(INSTALL_CMAKE_FILES "Install the *.cmake files into the CMake root" ON)
#IF(${CMAKE_SYSTEM_NAME} MATCHES "Windows") # detect os
#ADD_DEFINITIONS(-D_WIN32 1) # WIN32 flag already exists
#ENDIF(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
ADD_DEFINITIONS(-DHAVE_LINUX)
SET(HAVE_LINUX TRUE)
ENDIF(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
IF(${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD")
ADD_DEFINITIONS(-DHAVE_OPENBSD)
SET(HAVE_OPENBSD TRUE)
ENDIF(${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD")
IF(${CMAKE_SYSTEM_NAME} MATCHES "NetBSD")
ADD_DEFINITIONS(-DHAVE_NETBSD)
SET(HAVE_NETBSD TRUE)
ENDIF(${CMAKE_SYSTEM_NAME} MATCHES "NetBSD")
IF(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
ADD_DEFINITIONS(-DHAVE_FREEBSD)
SET(HAVE_FREEBSD TRUE)
ENDIF(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
IF(${CMAKE_SYSTEM_NAME} MATCHES "BSD")
ADD_DEFINITIONS(-DHAVE_BSD)
SET(HAVE_BSD TRUE)
ENDIF(${CMAKE_SYSTEM_NAME} MATCHES "BSD")
IF(${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
ADD_DEFINITIONS(-DHAVE_SOLARIS)
SET(HAVE_SOLARIS TRUE)
ENDIF(${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
IF(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
ADD_DEFINITIONS(-DHAVE_APPLE) # APPLE flag already exists
SET(HAVE_APPLE TRUE)
# RPATH setting from https://cmake.org/Wiki/CMake_RPATH_handling#Mac_OS_X_and_the_RPATH (should use cmake >= 2.8.12)
set(CMAKE_MACOSX_RPATH ON)
set(CMAKE_SKIP_BUILD_RPATH FALSE)
set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
list(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/lib" isSystemDir)
if("${isSystemDir}" STREQUAL "-1")
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
endif()
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_LINKER_FLAGS} -undefined warning -flat_namespace")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_FLAGS} -undefined warning -flat_namespace")
SET(CMAKE_FIND_ROOT_PATH ${CMAKE_FIND_ROOT_PATH} /usr/local/opt /usr/local/opt/gettext /usr/local/opt/perl) # workaround for homebrew path
SET(GETTEXT_EXEC_PATH "/usr/local/opt/gettext")
SET(OPENSSL_ROOT_DIR "/usr/local/opt/openssl")
ENDIF(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
IF(EXISTS "/etc/alpine-release")
ADD_DEFINITIONS(-DHAVE_ALPINE)
SET(HAVE_ALPINE TRUE)
ENDIF(EXISTS "/etc/alpine-release")
IF(LIB_INSTALL_DIR)
SET(LIBDIR ${LIB_INSTALL_DIR})
ENDIF(LIB_INSTALL_DIR)
IF(NOT LIBDIR)
SET(LIBDIR "lib")
ENDIF(NOT LIBDIR)
IF(PLUGIN_INSTALL_DIR)
SET(PLUGINDIR ${PLUGIN_INSTALL_DIR})
ENDIF(PLUGIN_INSTALL_DIR)
IF(NOT PLUGINDIR)
SET(PLUGINDIR "${LIBDIR}")
ENDIF(NOT PLUGINDIR)
message(STATUS "[ OK ] Library directory: ${CMAKE_INSTALL_PREFIX}/${LIBDIR}")
Find_Package(OpenSSL 1.1.0 REQUIRED) # find dependences
Find_Package(Crypt REQUIRED)
Find_Package(MySQL REQUIRED)
Find_Package(ZLIB REQUIRED)
Find_Package(MaxMindDB REQUIRED)
#Find_Package(Iconv REQUIRED)
Find_Package(ICU REQUIRED)
Find_Package(DL REQUIRED)
Find_Package(Pcre REQUIRED)
Find_Package(Threads REQUIRED)
Find_Package(Gettext REQUIRED)
Find_Package(Gettext-devel REQUIRED)
Find_Package(Libintl REQUIRED)
FIND_LIBRARY(GETTEXT_ASPRINTF_LIBRARY asprintf DOC "Gettext asprintf library")
OPTION(USE_CUSTOM_AUTOSPRINTF "Build using custom internal autosprintf implementation?" OFF) # use cmake -DUSE_CUSTOM_AUTOSPRINTF=ON to use our own autosprintf
IF(USE_CUSTOM_AUTOSPRINTF)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DUSE_CUSTOM_AUTOSPRINTF")
SET(GETTEXT_ASPRINTF_LIBRARY "")
MESSAGE(STATUS "[ OK ] Using custom internal autosprintf implementation.")
ELSE(USE_CUSTOM_AUTOSPRINTF)
IF(GETTEXT_ASPRINTF_LIBRARY)
MESSAGE(STATUS "[ OK ] Found asprintf library: ${GETTEXT_ASPRINTF_LIBRARY}")
ELSE(GETTEXT_ASPRINTF_LIBRARY)
MESSAGE(FATAL_ERROR "[ ER ] asprintf library not found, please install it via your package manager or compile from source, else please try cmake with: -DUSE_CUSTOM_AUTOSPRINTF=ON")
ENDIF(GETTEXT_ASPRINTF_LIBRARY)
ENDIF(USE_CUSTOM_AUTOSPRINTF)
IF(HAVE_BSD)
Find_Package(ExecInfo REQUIRED)
Find_Package(SysInfo REQUIRED)
#Find_Package(LibKVM) # optional
SET(CMAKE_CXX_COMPILER "clang++")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
ENDIF(HAVE_BSD)
IF(HAVE_ALPINE)
Find_Package(ExecInfo REQUIRED)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated")
ENDIF(HAVE_ALPINE)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DU_USING_ICU_NAMESPACE=1")
SET(CMAKE_CXX_STANDARD 11)
SET(CMAKE_CXX_STANDARD_REQUIRED ON)
SET(CMAKE_CXX_EXTENSIONS OFF)
IF(HAVE_BSD)
#IF(HAVE_LIBKVM)
#SET(VERLIHUB_LIBS ${OPENSSL_LIBRARIES} ${CRYPT_LIBRARIES} ${MYSQL_LIBRARIES} ${MAXMINDDB_LIBRARIES} ${ICU_LIBRARIES} ${ZLIB_LIBRARIES} ${PCRE_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} ${GETTEXT_ASPRINTF_LIBRARY} ${LIBINTL_LIBRARIES} ${EXECINFO_LIBRARY} ${SYSINFO_LIBRARY} ${LIBKVM_LIBRARY}) # ${ICONV_LIBRARIES}
#ELSE(HAVE_LIBKVM)
SET(VERLIHUB_LIBS ${OPENSSL_LIBRARIES} ${CRYPT_LIBRARIES} ${MYSQL_LIBRARIES} ${MAXMINDDB_LIBRARIES} ${ICU_LIBRARIES} ${ZLIB_LIBRARIES} ${PCRE_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} ${GETTEXT_ASPRINTF_LIBRARY} ${LIBINTL_LIBRARIES} ${EXECINFO_LIBRARY} ${SYSINFO_LIBRARY}) # ${ICONV_LIBRARIES}
#ENDIF(HAVE_LIBKVM)
ELSE(HAVE_BSD)
SET(VERLIHUB_LIBS ${OPENSSL_LIBRARIES} ${CRYPT_LIBRARIES} ${MYSQL_LIBRARIES} ${MAXMINDDB_LIBRARIES} ${ICU_LIBRARIES} ${ZLIB_LIBRARIES} ${PCRE_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} ${GETTEXT_ASPRINTF_LIBRARY} ${LIBINTL_LIBRARIES}) # ${ICONV_LIBRARIES}
ENDIF(HAVE_BSD)
IF(HAVE_ALPINE)
SET(VERLIHUB_LIBS ${OPENSSL_LIBRARIES} ${CRYPT_LIBRARIES} ${MYSQL_LIBRARIES} ${MAXMINDDB_LIBRARIES} ${ICU_LIBRARIES} ${ZLIB_LIBRARIES} ${PCRE_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} ${GETTEXT_ASPRINTF_LIBRARY} ${LIBINTL_LIBRARIES} ${EXECINFO_LIBRARY})
ENDIF(HAVE_ALPINE)
SET(VERLIHUB_SCRIPTS_LIBS "-lverlihub -lvhapi")
IF(HAVE_BSD)
#IF(HAVE_LIBKVM)
#SET(VERLIHUB_INCLUDE_DIRS "-I${OPENSSL_INCLUDE_DIR} -I${MYSQL_INCLUDE_DIR} -I${MAXMINDDB_INCLUDE_DIR} -I${ICU_INCLUDE_DIR} -I${ZLIB_INCLUDE_DIRS} -I${PCRE_INCLUDE_DIRS} -I${LIBINTL_INCLUDE_DIR} -I${EXECINFO_INCLUDE_DIR} -I${SYSINFO_INCLUDE_DIR} -I${LIBKVM_INCLUDE_DIR}") # -I${ICONV_INCLUDE_DIR}
#INCLUDE_DIRECTORIES(${OPENSSL_INCLUDE_DIR} ${MYSQL_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR} ${MAXMINDDB_INCLUDE_DIR} ${ICU_INCLUDE_DIR} ${PCRE_INCLUDE_DIR} ${LIBINTL_INCLUDE_DIR} ${EXECINFO_INCLUDE_DIR} ${SYSINFO_INCLUDE_DIR} ${LIBKVM_INCLUDE_DIR} ${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/src ${CMAKE_BINARY_DIR}) # ${ICONV_INCLUDE_DIR}
#ELSE(HAVE_LIBKVM)
SET(VERLIHUB_INCLUDE_DIRS "-I${OPENSSL_INCLUDE_DIR} -I${MYSQL_INCLUDE_DIR} -I${MAXMINDDB_INCLUDE_DIR} -I${ICU_INCLUDE_DIR} -I${ZLIB_INCLUDE_DIRS} -I${PCRE_INCLUDE_DIRS} -I${LIBINTL_INCLUDE_DIR} -I${EXECINFO_INCLUDE_DIR} -I${SYSINFO_INCLUDE_DIR}") # -I${ICONV_INCLUDE_DIR}
INCLUDE_DIRECTORIES(${OPENSSL_INCLUDE_DIR} ${MYSQL_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR} ${MAXMINDDB_INCLUDE_DIR} ${ICU_INCLUDE_DIR} ${PCRE_INCLUDE_DIR} ${LIBINTL_INCLUDE_DIR} ${EXECINFO_INCLUDE_DIR} ${SYSINFO_INCLUDE_DIR} ${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/src ${CMAKE_BINARY_DIR}) # ${ICONV_INCLUDE_DIR}
#ENDIF(HAVE_LIBKVM)
ELSE(HAVE_BSD)
SET(VERLIHUB_INCLUDE_DIRS "-I${OPENSSL_INCLUDE_DIR} -I${MYSQL_INCLUDE_DIR} -I${MAXMINDDB_INCLUDE_DIR} -I${ICU_INCLUDE_DIR} -I${ZLIB_INCLUDE_DIRS} -I${PCRE_INCLUDE_DIRS} -I${LIBINTL_INCLUDE_DIR}") # -I${ICONV_INCLUDE_DIR}
INCLUDE_DIRECTORIES(${OPENSSL_INCLUDE_DIR} ${MYSQL_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR} ${MAXMINDDB_INCLUDE_DIR} ${ICU_INCLUDE_DIR} ${PCRE_INCLUDE_DIR} ${LIBINTL_INCLUDE_DIR} ${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/src ${CMAKE_BINARY_DIR}) # ${ICONV_INCLUDE_DIR}
ENDIF(HAVE_BSD)
# ----------------------------------------------------------------------------------------------------
CHECK_INCLUDE_FILES(errno.h HAVE_ERRNO_H)
CHECK_INCLUDE_FILES(sys/poll.h HAVE_SYS_POLL_H)
CHECK_INCLUDE_FILES(getopt.h HAVE_GETOPT_H)
CHECK_INCLUDE_FILES(syslog.h HAVE_SYSLOG_H)
IF(HAVE_SYSLOG_H)
ADD_DEFINITIONS(-DENABLE_SYSLOG)
ENDIF(HAVE_SYSLOG_H)
IF(NOT HAVE_GETOPT_H)
MESSAGE(FATAL_ERROR "[ ER ] getopt.h header not found, it is required to build Verlihub.")
ENDIF(NOT HAVE_GETOPT_H)
OPTION(DEFINE_DEBUG "Build the project using debugging code" OFF) # use cmake -DDEFINE_DEBUG=ON to enable debug
IF(DEFINE_DEBUG)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -O3 -g") # -Wextra
SET(CMAKE_BUILD_TYPE Debug)
ELSE(DEFINE_DEBUG)
SET(CMAKE_BUILD_TYPE Release)
ENDIF(DEFINE_DEBUG)
#ADD_DEFINITIONS(-DUSE_SSL_CONNECTS)
#OPTION(USE_SSL_CONNECTS "Use SSL secured connects" ON) # use cmake -DUSE_SSL_CONNECTS=OFF to disable ssl
MESSAGE(STATUS "[ OK ] Build type: ${CMAKE_BUILD_TYPE}")
ADD_DEFINITIONS(-DHAVE_CONFIG_H)
IF(UNIX)
FIND_PROGRAM(BASH_PATH bash
PATHS
/usr/bin
/usr/local/bin
)
IF(NOT BASH_PATH)
MESSAGE(FATAL_ERROR "[ ER ] Bash shell not found, please install it via your package manager or compile from source: http://ftp.gnu.org/gnu/bash/")
ENDIF(NOT BASH_PATH)
ENDIF(UNIX)
# ----------------------------------------------------------------------------------------------------
MESSAGE(STATUS "[ OK ] Generating configuration file: ${CMAKE_BINARY_DIR}/config.h") # generate configuration files
CONFIGURE_FILE("${CMAKE_SOURCE_DIR}/cmake/config.h.cm" "${CMAKE_BINARY_DIR}/config.h")
MESSAGE(STATUS "[ OK ] Generating directory settings file: ${CMAKE_BINARY_DIR}/dirsettings.h")
CONFIGURE_FILE("${CMAKE_SOURCE_DIR}/cmake/dirsettings.h.cm" "${CMAKE_BINARY_DIR}/dirsettings.h")
# ----------------------------------------------------------------------------------------------------
if(INSTALL_CMAKE_FILES)
install(FILES "${CMAKE_SOURCE_DIR}/cmake/Modules/FindVerlihub.cmake" DESTINATION ${CMAKE_ROOT}/Modules)
endif()
CONFIGURE_FILE("${CMAKE_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in" "${CMAKE_BINARY_DIR}/cmake/cmake_uninstall.cmake" IMMEDIATE @ONLY) # create uninstall configuration file and uninstall target
ADD_CUSTOM_TARGET(uninstall "${CMAKE_COMMAND}" -P "${PROJECT_BINARY_DIR}/cmake/cmake_uninstall.cmake")
# ----------------------------------------------------------------------------------------------------
ADD_SUBDIRECTORY(src)
ADD_SUBDIRECTORY(plugins)
ADD_SUBDIRECTORY(share)
ADD_SUBDIRECTORY(scripts)
ADD_SUBDIRECTORY(po)
ADD_SUBDIRECTORY(man)
# ----------------------------------------------------------------------------------------------------
INCLUDE(InstallRequiredSystemLibraries) # build a CPack driven installer package
SET(CPACK_PACKAGE_NAME "verlihub")
SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/COPYING")
SET(CPACK_PACKAGE_DESCRIPTION "Verlihub Direct Connect Hub Server")
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Verlihub Direct Connect Hub Server")
SET(CPACK_PACKAGE_CONTACT "info@verlihub.net")
SET(CPACK_PACKAGE_VENDOR "Verlihub Team")
SET(CPACK_PACKAGE_VERSION_MAJOR "${VERLIHUB_VERSION_MAJOR}")
SET(CPACK_PACKAGE_VERSION_MINOR "${VERLIHUB_VERSION_MINOR}")
SET(CPACK_PACKAGE_VERSION_PATCH "${VERLIHUB_VERSION_PATCH}")
SET(CPACK_PACKAGE_VERSION_TWEAK "${VERLIHUB_VERSION_TWEAK}")
SET(CPACK_PACKAGE_VERSION "${VERLIHUB_VERSION}")
SET(CPACK_DEBIAN_PACKAGE_SECTION "net")
SET(CPACK_DEBIAN_PACKAGE_DEPENDS "zlib, mysql-server-5.5, mysql-client-5.5, mmdb-bin, gettext, libssl, openssl, libpcre3")
SET(CPACK_RPM_PACKAGE_LICENSE ${CPACK_RESOURCE_FILE_LICENSE})
SET(CPACK_RPM_PACKAGE_URL "https://github.com/verlihub/")
SET(CPACK_RPM_PACKAGE_GROUP "Application/Internet")
SET(CPACK_RPM_PACKAGE_REQUIRES "zlib, openssl, mysql-server >= 5.0, mysql >= 5.0, maxminddb, gettext, pcre")
IF(WITH_PYTHON)
SET(CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_DEPENDS}, python (>= 2.7)")
SET(CPACK_RPM_PACKAGE_REQUIRES "${CPACK_RPM_PACKAGE_REQUIRES}, python2.7 >= 2.7")
ENDIF(WITH_PYTHON)
IF(WITH_LUA)
SET(CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_DEPENDS}, lua (>= 5.2)")
SET(CPACK_RPM_PACKAGE_REQUIRES "${CPACK_RPM_PACKAGE_REQUIRES}, lua >= 5.2")
ENDIF(WITH_LUA)
SET(CPACK_GENERATOR "DEB;RPM;TBZ2")
SET(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${VERLIHUB_VERSION}-${CMAKE_SYSTEM_PROCESSOR}")
SET(CPACK_SET_DESTDIR ON)
INCLUDE(CPack)
# ----------------------------------------------------------------------------------------------------
message(STATUS)
message(STATUS "========== Build information ==========")
message(STATUS)
message(STATUS "[ OK ] Hub version: ${VERLIHUB_VERSION}")
message(STATUS "[ OK ] CMAKE_INSTALL_PREFIX: ${CMAKE_INSTALL_PREFIX}")
message(STATUS "[ OK ] Building plugins: ${OK_PLUGINS_COUNT} of ${ALL_PLUGINS_COUNT}")
message(STATUS "[ OK ] Now please run \"make\" as current user and \"make install\" as super user.")
message(STATUS)
message(STATUS "================= End =================")
message(STATUS)
# end of file