]> granicus.if.org Git - icinga2/blob - CMakeLists.txt
InfluxDBWriter: Fix macro in template
[icinga2] / CMakeLists.txt
1 # Icinga 2
2 # Copyright (C) 2012-2018 Icinga Development Team (https://www.icinga.com/)
3 #
4 # This program is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU General Public License
6 # as published by the Free Software Foundation; either version 2
7 # of the License, or (at your option) any later version.
8 #
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
13 #
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software Foundation
16 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
17
18 cmake_minimum_required(VERSION 2.8.8)
19 set(BOOST_MIN_VERSION "1.48.0")
20
21 project(icinga2)
22 list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
23 list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/third-party/cmake")
24
25 if(NOT CMAKE_BUILD_TYPE)
26   set(CMAKE_BUILD_TYPE Release CACHE STRING
27       "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel."
28       FORCE)
29 endif()
30
31 option(ICINGA2_WITH_MYSQL "Build the MySQL IDO module" ON)
32 option(ICINGA2_WITH_PGSQL "Build the PostgreSQL IDO module" ON)
33 option(ICINGA2_WITH_CHECKER "Build the checker module" ON)
34 option(ICINGA2_WITH_COMPAT "Build the compat module" ON)
35 option(ICINGA2_WITH_LIVESTATUS "Build the Livestatus module" ON)
36 option(ICINGA2_WITH_NOTIFICATION "Build the notification module" ON)
37 option(ICINGA2_WITH_PERFDATA "Build the perfdata module" ON)
38 option(ICINGA2_WITH_STUDIO "Build the Icinga Studio application" OFF)
39 option(ICINGA2_WITH_TESTS "Run unit tests" ON)
40
41 file(STRINGS icinga2.spec VERSION_LINE REGEX "^Version: ")
42 string(REPLACE "Version: " "" ICINGA2_VERSION ${VERSION_LINE})
43
44 include(GNUInstallDirs)
45 include(InstallConfig)
46
47 set(ICINGA2_USER "icinga" CACHE STRING "Icinga 2 user")
48 set(ICINGA2_GROUP "icinga" CACHE STRING "Icinga 2 group")
49 set(ICINGA2_COMMAND_GROUP "icingacmd" CACHE STRING "Icinga 2 command group")
50 set(ICINGA2_RUNDIR "${CMAKE_INSTALL_FULL_LOCALSTATEDIR}/run" CACHE STRING "/run directory")
51 set(ICINGA2_PLUGINDIR "/usr/lib/nagios/plugins" CACHE STRING "Path for the check plugins")
52 set(ICINGA2_GIT_VERSION_INFO ON CACHE BOOL "Whether to use git describe")
53 set(ICINGA2_UNITY_BUILD ON CACHE BOOL "Whether to perform a unity build")
54 set(ICINGA2_LTO_BUILD OFF CACHE BOOL "Whether to use LTO")
55
56 site_name(ICINGA2_BUILD_HOST_NAME)
57 set(ICINGA2_BUILD_COMPILER_NAME "${CMAKE_CXX_COMPILER_ID}")
58
59 if(NOT CMAKE_CXX_COMPILER_VERSION)
60   execute_process(COMMAND ${CMAKE_CXX_COMPILER} -dumpversion
61     OUTPUT_VARIABLE CMAKE_CXX_COMPILER_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
62 endif()
63
64 set(ICINGA2_BUILD_COMPILER_VERSION "${CMAKE_CXX_COMPILER_VERSION}")
65
66 file(READ "${CMAKE_CURRENT_SOURCE_DIR}/COPYING" ICINGA2_LICENSE_GPL)
67 file(READ "${CMAKE_CURRENT_SOURCE_DIR}/COPYING.Exceptions" ICINGA2_LICENSE_ADDITIONS)
68 set(ICINGA2_LICENSE "${ICINGA2_LICENSE_GPL}\n\n---\n\n${ICINGA2_LICENSE_ADDITIONS}")
69 file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/LICENSE.txt" ${ICINGA2_LICENSE})
70
71 file(STRINGS icinga2.spec SPEC_VERSION REGEX "^Version:")
72 string(LENGTH "${SPEC_VERSION}" SPEC_VERSION_LENGTH)
73 math(EXPR SPEC_VERSION_LENGTH "${SPEC_VERSION_LENGTH} - 9")
74 string(SUBSTRING ${SPEC_VERSION} 9 ${SPEC_VERSION_LENGTH} SPEC_VERSION)
75
76 configure_file(icinga-spec-version.h.cmake icinga-spec-version.h)
77
78 include(GetGitRevisionDescription)
79 git_describe(GIT_VERSION --tags)
80 if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/icinga-version.h.force)
81   configure_file(icinga-version.h.force ${CMAKE_CURRENT_BINARY_DIR}/icinga-version.h COPYONLY)
82 else()
83   if(NOT ICINGA2_GIT_VERSION_INFO OR GIT_VERSION MATCHES "-NOTFOUND$")
84     file(STRINGS icinga2.spec SPEC_REVISION REGEX "^%define revision ")
85     string(LENGTH "${SPEC_REVISION}" SPEC_REVISION_LENGTH)
86     math(EXPR SPEC_REVISION_LENGTH "${SPEC_REVISION_LENGTH} - 17")
87     string(SUBSTRING ${SPEC_REVISION} 17 ${SPEC_REVISION_LENGTH} SPEC_REVISION)
88
89     set(GIT_VERSION "r${SPEC_VERSION}-${SPEC_REVISION}")
90   endif()
91   configure_file(icinga-version.h.cmake icinga-version.h)
92 endif()
93
94 if(WIN32)
95   set(Boost_USE_STATIC_LIBS ON)
96   add_definitions(-DBOOST_ALL_NO_LIB)
97   set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /bigobj")
98   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj")
99 endif()
100
101 if(NOT DEFINED LOGROTATE_HAS_SU)
102   set(LOGROTATE_HAS_SU OFF)
103   find_program(LOGROTATE_BINARY logrotate)
104   execute_process(COMMAND ${LOGROTATE_BINARY} ERROR_VARIABLE LOGROTATE_OUTPUT)
105   if(LOGROTATE_OUTPUT)
106     string(REGEX REPLACE "^logrotate ([0-9.]*).*" "\\1" LOGROTATE_VERSION
107       ${LOGROTATE_OUTPUT})
108     message(STATUS "Found logrotate (found version \"${LOGROTATE_VERSION}\")")
109     if("${LOGROTATE_VERSION}" VERSION_GREATER "3.7.9")
110       set(LOGROTATE_HAS_SU ON)
111     endif()
112   endif()
113 endif()
114 if(LOGROTATE_HAS_SU)
115   set(LOGROTATE_USE_SU "\n\tsu ${ICINGA2_USER} ${ICINGA2_GROUP}")
116 endif()
117
118 find_package(Boost ${BOOST_MIN_VERSION} COMPONENTS thread system program_options regex REQUIRED)
119
120 link_directories(${Boost_LIBRARY_DIRS})
121 include_directories(${Boost_INCLUDE_DIRS})
122
123 find_package(OpenSSL REQUIRED)
124 include_directories(${OPENSSL_INCLUDE_DIR})
125
126 find_package(YAJL)
127
128 if(NOT YAJL_FOUND)
129   include_directories(${icinga2_BINARY_DIR}/third-party/yajl/include)
130   link_directories(${icinga2_BINARY_DIR}/third-party/yajl)
131   set(YAJL_LIBRARIES "yajl")
132 endif()
133
134 find_package(Editline)
135 set(HAVE_EDITLINE "${EDITLINE_FOUND}")
136
137 find_package(Termcap)
138 set(HAVE_TERMCAP "${TERMCAP_FOUND}")
139
140 include_directories(
141   ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/lib
142   ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}/lib
143 )
144
145 set(CMAKE_MACOSX_RPATH 1)
146
147 if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
148   set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Qunused-arguments -fcolor-diagnostics")
149   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Qunused-arguments -fcolor-diagnostics")
150
151   # Clang on Fedora requires -pthread, Apple Clang does not
152   # AppleClang is available since CMake 3.0.0
153   if (NOT CMAKE_CXX_COMPILER_ID MATCHES "AppleClang")
154     set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pthread")
155     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")
156   endif()
157 endif()
158
159 if(CMAKE_C_COMPILER_ID STREQUAL "SunPro")
160     set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mt")
161     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mt -library=stlport4")
162 endif()
163
164 if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
165   if(CMAKE_SYSTEM_NAME MATCHES AIX)
166     set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -g -lpthread")
167     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -lpthread")
168   elseif(CMAKE_SYSTEM_NAME MATCHES "kOpenBSD.*|OpenBSD.*")
169     set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -pthread")
170     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -pthread")
171     set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lpthread")
172     set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -lpthread")
173     set(CMAKE_STATIC_LINKER_FLAGS "${CMAKE_STATIC_LINKER_FLAGS} -lpthread")
174   else()
175     set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -pthread")
176     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -pthread")
177   endif()
178 endif()
179
180 if(CMAKE_SYSTEM_NAME MATCHES "Darwin")
181   function(add_whole_static_library target library)
182     target_link_libraries(${target} -force_load ${library})
183   endfunction()
184 elseif(MSVC)
185   function(add_whole_static_library target library)
186     target_link_libraries(${target} ${library})
187     set_property(TARGET ${target} APPEND_STRING PROPERTY LINK_FLAGS "/wholearchive:${library} ")
188   endfunction()
189 else()
190   function(add_whole_static_library target library)
191     target_link_libraries(${target} -Wl,--whole-archive ${library} -Wl,--no-whole-archive)
192   endfunction()
193 endif()
194
195 include(CheckCXXCompilerFlag)
196
197 function(check_cxx_linker_flag flag var)
198   set(CMAKE_REQUIRED_FLAGS ${flag})
199   set(result 0)
200   check_cxx_compiler_flag(${flag} result)
201   set(${var} ${result} PARENT_SCOPE)
202 endfunction()
203
204 check_cxx_linker_flag("-Wl,--gc-sections" LD_GC_SECTIONS)
205
206 if(LD_GC_SECTIONS)
207   set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--gc-sections")
208   set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--gc-sections")
209 endif()
210
211 check_cxx_linker_flag("-Wl,--no-export-dynamic" LD_NO_EXPORT_DYNAMIC)
212
213 if(LD_NO_EXPORT_DYNAMIC)
214   set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--no-export-dynamic")
215   set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-export-dynamic")
216 endif()
217
218 check_cxx_linker_flag("-Bsymbolic-functions" LD_SYMBOLIC_FUNCTIONS)
219
220 if(LD_SYMBOLIC_FUNCTIONS)
221   set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Bsymbolic-functions")
222   set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Bsymbolic-functions")
223 endif()
224
225 check_cxx_linker_flag("-Wl,--dynamic-list-cpp-typeinfo" LD_DYNAMIC_LIST_CPP_TYPEINFO)
226
227 if(LD_DYNAMIC_LIST_CPP_TYPEINFO)
228   set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--dynamic-list-cpp-typeinfo")
229   set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--dynamic-list-cpp-typeinfo")
230 endif()
231
232 check_cxx_linker_flag("-Wl,--dynamic-list-data" LD_DYNAMIC_LIST_DATA)
233
234 if(LD_DYNAMIC_LIST_DATA)
235   set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--dynamic-list-data")
236   set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--dynamic-list-data")
237 endif()
238
239 check_cxx_compiler_flag("-Winvalid-pch" CXX_INVALID_PCH)
240
241 if(CXX_INVALID_PCH)
242   set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Winvalid-pch")
243   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Winvalid-pch")
244 endif()
245
246 if(ICINGA2_LTO_BUILD)
247   check_cxx_compiler_flag("-flto" CXX_FLAG_LTO)
248
249   if(NOT CXX_FLAG_LTO)
250     message(WARNING "Compiler does not support LTO, falling back to non-LTO build")
251   else()
252     set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -flto")
253     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -flto")
254     set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -flto")
255     set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -flto")
256   endif()
257 endif()
258
259 if(MSVC)
260   add_definitions(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS)
261 endif()
262
263 set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/Bin/${CMAKE_BUILD_TYPE} CACHE PATH "Library output path")
264 set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/Bin/${CMAKE_BUILD_TYPE} CACHE PATH "Executable output path")
265
266 include(CheckSymbolExists)
267 include(CheckFunctionExists)
268 include(CheckLibraryExists)
269 include(CheckIncludeFileCXX)
270
271 check_symbol_exists(__COUNTER__ "" HAVE_COUNTER_MACRO)
272
273 if(NOT HAVE_COUNTER_MACRO)
274 message(FATAL_ERROR "Your C/C++ compiler does not support the __COUNTER__ macro.")
275 endif()
276
277 set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DI2_DEBUG")
278 set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DI2_DEBUG")
279
280 check_function_exists(vfork HAVE_VFORK)
281 check_function_exists(backtrace_symbols HAVE_BACKTRACE_SYMBOLS)
282 check_function_exists(pipe2 HAVE_PIPE2)
283 check_function_exists(nice HAVE_NICE)
284 check_library_exists(dl dladdr "dlfcn.h" HAVE_DLADDR)
285 check_library_exists(execinfo backtrace_symbols "" HAVE_LIBEXECINFO)
286 check_include_file_cxx(cxxabi.h HAVE_CXXABI_H)
287
288 if(HAVE_LIBEXECINFO)
289   set(HAVE_BACKTRACE_SYMBOLS TRUE)
290 endif()
291
292 if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
293   exec_program(${CMAKE_CXX_COMPILER}
294     ARGS -dumpversion
295     OUTPUT_VARIABLE _ICINGA2_COMPILER_VERSION
296   )
297
298   if("${CMAKE_CXX_COMPILER_VERSION}" VERSION_LESS "4.7.0")
299     message(FATAL_ERROR "Your version of GCC (${CMAKE_CXX_COMPILER_VERSION}) is too old for building Icinga 2 (GCC >= 4.7.0 is required).")
300   endif()
301 endif()
302
303 if(NOT MSVC)
304   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
305
306   check_cxx_source_compiles("class Base { public: virtual void test(void) { } }; class Derived : public Base { virtual void test(void) override { } }; int main(){}" CXX_FEATURE_OVERRIDE)
307
308   if(NOT CXX_FEATURE_OVERRIDE)
309     add_definitions("-Doverride=")
310   endif()
311 endif()
312
313 configure_file(config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h ESCAPE_QUOTES)
314
315 install(
316   FILES README.md COPYING COPYING.Exceptions AUTHORS CHANGELOG.md NEWS
317   DESTINATION ${CMAKE_INSTALL_DOCDIR}
318 )
319
320 include(CTest)
321 enable_testing()
322
323 set_property(GLOBAL PROPERTY USE_FOLDERS ON)
324
325 add_subdirectory(third-party)
326 add_subdirectory(tools)
327 add_subdirectory(lib)
328 add_subdirectory(icinga-app)
329 add_subdirectory(etc)
330 add_subdirectory(itl)
331 add_subdirectory(doc)
332 add_subdirectory(agent)
333 add_subdirectory(plugins)
334 add_subdirectory(choco)
335
336 if(MSVC)
337   add_subdirectory(icinga-installer)
338 endif()
339
340 if(ICINGA2_WITH_STUDIO)
341   add_subdirectory(icinga-studio)
342 endif()
343
344 if(ICINGA2_WITH_TESTS)
345   add_subdirectory(test)
346 endif()
347
348 set(CPACK_PACKAGE_NAME "Icinga 2")
349 set(CPACK_PACKAGE_VENDOR "Icinga Development Team")
350 set(CPACK_PACKAGE_VERSION ${ICINGA2_VERSION})
351 set(CPACK_PACKAGE_INSTALL_DIRECTORY "ICINGA2")
352 set(CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/icinga-app\\\\icinga.ico")
353 set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_BINARY_DIR}/LICENSE.txt")
354
355 set(CPACK_PACKAGE_EXECUTABLES "Icinga2SetupAgent;Icinga 2 Agent Wizard;icinga-studio;Icinga Studio")
356 set(CPACK_WIX_PRODUCT_ICON "${CMAKE_CURRENT_SOURCE_DIR}/icinga-app\\\\icinga.ico")
357 set(CPACK_WIX_UPGRADE_GUID "52F2BEAA-4DF0-4C3E-ABDC-C0F61DE4DF8A")
358 set(CPACK_WIX_EXTENSIONS "WixUtilExtension")
359 set(CPACK_WIX_UI_BANNER "${CMAKE_CURRENT_SOURCE_DIR}/icinga-installer/bannrbmp.bmp")
360 set(CPACK_WIX_UI_DIALOG "${CMAKE_CURRENT_SOURCE_DIR}/icinga-installer/dlgbmp.bmp")
361 set(CPACK_WIX_PATCH_FILE "${CMAKE_CURRENT_BINARY_DIR}/icinga-installer/icinga2.wixpatch.Debug")
362 set(CPACK_WIX_PATCH_FILE "${CMAKE_CURRENT_BINARY_DIR}/icinga-installer/icinga2.wixpatch")
363
364 set(CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION "sbin")
365 set(CMAKE_INSTALL_UCRT_LIBRARIES TRUE)
366 include(InstallRequiredSystemLibraries)
367
368 if(WIN32)
369   if(CMAKE_VS_PLATFORM_NAME STREQUAL "x64")
370     set(NSCP_URL "https://github.com/mickem/nscp/releases/download/0.5.0.62/NSCP-0.5.0.62-x64.msi")
371     set(NSCP_SHA256 "1854de86ad4fda3391f273de0f9985b702c014bdec01b26ad28a1343177f537f")
372   else()
373     set(NSCP_URL "https://github.com/mickem/nscp/releases/download/0.5.0.62/NSCP-0.5.0.62-Win32.msi")
374     set(NSCP_SHA256 "2186b60d588fa0811344ce709332f9c63670019c62ae92eae49698bf76205a95")
375   endif()
376
377   set(NSCP_SHA256SUM "")
378   if (EXISTS ${CMAKE_CURRENT_BINARY_DIR}/NSCP.msi)
379     file(SHA256 ${CMAKE_CURRENT_BINARY_DIR}/NSCP.msi NSCP_SHA256SUM)
380   endif()
381
382   if (NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/NSCP.msi OR NOT ${NSCP_SHA256SUM} STREQUAL ${NSCP_SHA256})
383     file(DOWNLOAD ${NSCP_URL} ${CMAKE_CURRENT_BINARY_DIR}/NSCP.msi SHOW_PROGRESS)
384   endif()
385
386   install(FILES ${CMAKE_CURRENT_BINARY_DIR}/NSCP.msi DESTINATION ${CMAKE_INSTALL_SBINDIR})
387
388   if (OPENSSL_VERSION_MINOR GREATER_EQUAL 1)
389     if (CMAKE_VS_PLATFORM_NAME STREQUAL "x64")
390       list (APPEND ICINGA2_OPENSSL_DLLS ${OPENSSL_INCLUDE_DIR}/../bin/libcrypto-1_1-x64.dll ${OPENSSL_INCLUDE_DIR}/../bin/libssl-1_1-x64.dll)
391     else()
392       list (APPEND ICINGA2_OPENSSL_DLLS ${OPENSSL_INCLUDE_DIR}/../bin/libcrypto-1_1.dll ${OPENSSL_INCLUDE_DIR}/../bin/libssl-1_1.dll)
393     endif()
394   else()
395       list (APPEND ICINGA2_OPENSSL_DLLS ${OPENSSL_INCLUDE_DIR}/../bin/libeay32.dll ${OPENSSL_INCLUDE_DIR}/../bin/ssleay32.dll)
396   endif()
397
398   install(
399     PROGRAMS ${ICINGA2_OPENSSL_DLLS}
400     DESTINATION ${CMAKE_INSTALL_SBINDIR}
401   )
402 endif()
403
404 include(CPack)