2014-11-07 13:32:20 +01:00
|
|
|
# Icinga 2
|
2015-01-22 12:00:23 +01:00
|
|
|
# Copyright (C) 2012-2015 Icinga Development Team (http://www.icinga.org)
|
2014-11-07 13:32:20 +01:00
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or
|
|
|
|
# modify it under the terms of the GNU General Public License
|
|
|
|
# as published by the Free Software Foundation; either version 2
|
|
|
|
# of the License, or (at your option) any later version.
|
|
|
|
#
|
|
|
|
# This program 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.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program; if not, write to the Free Software Foundation
|
|
|
|
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
|
2015-02-02 11:11:43 +01:00
|
|
|
if ( WIN32 )
|
2014-11-06 15:17:08 +01:00
|
|
|
|
2015-02-02 11:11:43 +01:00
|
|
|
add_definitions( -DUNICODE -D_UNICODE )
|
2014-11-07 13:32:20 +01:00
|
|
|
|
2015-02-02 11:11:43 +01:00
|
|
|
add_library( thresholds thresholds )
|
2014-11-07 13:32:20 +01:00
|
|
|
set_target_properties (
|
|
|
|
thresholds PROPERTIES
|
|
|
|
INSTALL_RPATH ${CMAKE_INSTALL_FULL_LIBDIR}/icinga2
|
|
|
|
FOLDER Plugins
|
|
|
|
)
|
|
|
|
|
2015-02-02 11:11:43 +01:00
|
|
|
list( APPEND check_SOURCES
|
2015-02-03 10:22:09 +01:00
|
|
|
check_disk.cpp check_load.cpp check_memory.cpp check_network.cpp check_ping.cpp check_procs.cpp
|
|
|
|
check_service.cpp check_swap.cpp check_update.cpp check_uptime.cpp check_users.cpp )
|
2014-11-07 13:32:20 +01:00
|
|
|
|
2015-02-02 11:11:43 +01:00
|
|
|
foreach ( source ${check_SOURCES} )
|
|
|
|
string ( REGEX REPLACE ".cpp\$" "" check_OUT "${source}" )
|
2014-11-07 13:32:20 +01:00
|
|
|
|
2015-02-02 11:11:43 +01:00
|
|
|
add_executable ( ${check_OUT} ${source} )
|
|
|
|
target_link_libraries( ${check_OUT} thresholds Shlwapi.lib ${Boost_PROGRAM_OPTIONS_LIBRARY} )
|
2014-11-07 13:32:20 +01:00
|
|
|
|
|
|
|
set_target_properties (
|
|
|
|
${check_OUT} PROPERTIES
|
|
|
|
INSTALL_RPATH ${CMAKE_INSTALL_FULL_LIBDIR}/icinga2
|
|
|
|
DEFINE_SYMBOL I2_PLUGINS_BUILD
|
|
|
|
FOLDER Plugins)
|
|
|
|
endforeach(source)
|
2014-11-06 15:17:08 +01:00
|
|
|
|
2015-02-02 11:11:43 +01:00
|
|
|
target_link_libraries( check_load Pdh.lib )
|
|
|
|
target_link_libraries( check_network Pdh.lib )
|
|
|
|
target_link_libraries( check_ping Ntdll.lib iphlpapi.lib Ws2_32.lib )
|
|
|
|
target_link_libraries( check_procs Pdh.lib )
|
|
|
|
target_link_libraries( check_uptime ${Boost_SYSTEM_LIBRARY} )
|
|
|
|
target_link_libraries( check_users wtsapi32.lib )
|
2014-11-06 15:17:08 +01:00
|
|
|
|
2014-11-07 13:32:20 +01:00
|
|
|
install (
|
2015-02-03 10:22:09 +01:00
|
|
|
TARGETS check_disk check_load check_memory check_network check_procs check_ping
|
|
|
|
check_service check_swap check_update check_uptime check_users
|
2015-02-02 11:11:43 +01:00
|
|
|
RUNTIME DESTINATION ${CMAKE_INSTALL_SBINDIR} )
|
2014-11-07 13:32:20 +01:00
|
|
|
|
2014-11-06 15:17:08 +01:00
|
|
|
endif()
|