2 # Copyright (C) 2012-2015 Icinga Development Team (http://www.icinga.org)
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.
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.
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.
20 add_definitions( -DUNICODE -D_UNICODE )
22 add_library( thresholds thresholds )
23 set_target_properties (
25 INSTALL_RPATH ${CMAKE_INSTALL_FULL_LIBDIR}/icinga2
29 list( APPEND check_SOURCES
30 check_disk.cpp check_load.cpp check_memory.cpp check_network.cpp check_ping.cpp check_procs.cpp
31 check_service.cpp check_swap.cpp check_update.cpp check_uptime.cpp check_users.cpp )
33 foreach ( source ${check_SOURCES} )
34 string ( REGEX REPLACE ".cpp\$" "" check_OUT "${source}" )
36 add_executable ( ${check_OUT} ${source} )
37 target_link_libraries( ${check_OUT} thresholds Shlwapi.lib ${Boost_PROGRAM_OPTIONS_LIBRARY} )
39 set_target_properties (
40 ${check_OUT} PROPERTIES
41 INSTALL_RPATH ${CMAKE_INSTALL_FULL_LIBDIR}/icinga2
42 DEFINE_SYMBOL I2_PLUGINS_BUILD
46 target_link_libraries( check_load Pdh.lib )
47 target_link_libraries( check_network Pdh.lib )
48 target_link_libraries( check_ping Ntdll.lib iphlpapi.lib Ws2_32.lib )
49 target_link_libraries( check_procs Pdh.lib )
50 target_link_libraries( check_uptime ${Boost_SYSTEM_LIBRARY} )
51 target_link_libraries( check_users wtsapi32.lib )
54 TARGETS check_disk check_load check_memory check_network check_procs check_ping
55 check_service check_swap check_update check_uptime check_users
56 RUNTIME DESTINATION ${CMAKE_INSTALL_SBINDIR} )