2 # Copyright (C) 2012-2018 Icinga Development Team (https://icinga.com/)
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.
18 add_executable(check_nscp_api
21 $<TARGET_OBJECTS:config>
22 $<TARGET_OBJECTS:remote>
24 target_link_libraries(check_nscp_api ${base_DEPS})
25 set_target_properties (
26 check_nscp_api PROPERTIES
27 INSTALL_RPATH ${CMAKE_INSTALL_FULL_LIBDIR}/icinga2
28 DEFINE_SYMBOL I2_PLUGINS_BUILD
31 # Prefer the PluginDir constant which is set to /sbin on Windows
34 install(TARGETS check_nscp_api RUNTIME DESTINATION ${CMAKE_INSTALL_SBINDIR})
36 install(TARGETS check_nscp_api RUNTIME DESTINATION ${ICINGA2_PLUGINDIR})
40 add_definitions(-DUNICODE -D_UNICODE)
42 set(thresholds_SOURCES
43 thresholds.cpp thresholds.hpp
46 add_library(thresholds ${thresholds_SOURCES})
48 set_target_properties(
50 INSTALL_RPATH ${CMAKE_INSTALL_FULL_LIBDIR}/icinga2
55 check_disk.cpp check_load.cpp check_memory.cpp check_network.cpp check_perfmon.cpp
56 check_ping.cpp check_procs.cpp check_service.cpp check_swap.cpp check_update.cpp check_uptime.cpp
60 foreach(source ${check_SOURCES})
61 string(REGEX REPLACE ".cpp\$" "" check_OUT "${source}")
63 add_executable(${check_OUT} ${source})
64 target_link_libraries(${check_OUT} thresholds shlwapi.lib ${Boost_PROGRAM_OPTIONS_LIBRARY})
66 set_target_properties(
67 ${check_OUT} PROPERTIES
68 INSTALL_RPATH ${CMAKE_INSTALL_FULL_LIBDIR}/icinga2
69 DEFINE_SYMBOL I2_PLUGINS_BUILD
74 target_link_libraries(check_load pdh.lib)
75 target_link_libraries(check_network pdh.lib iphlpapi.lib)
76 target_link_libraries(check_perfmon pdh.lib)
77 target_link_libraries(check_ping ntdll.lib iphlpapi.lib ws2_32.lib)
78 target_link_libraries(check_procs pdh.lib)
79 target_link_libraries(check_uptime ${Boost_SYSTEM_LIBRARY})
80 target_link_libraries(check_users wtsapi32.lib)
83 TARGETS check_disk check_load check_memory check_network check_perfmon check_procs
84 check_ping check_service check_swap check_update check_uptime check_users
85 RUNTIME DESTINATION ${CMAKE_INSTALL_SBINDIR}