]> granicus.if.org Git - icinga2/blob - icinga-studio/CMakeLists.txt
Sync cluster config before replaying the logs
[icinga2] / icinga-studio / CMakeLists.txt
1 # Icinga 2
2 # Copyright (C) 2012-2015 Icinga Development Team (http://www.icinga.org)
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 set(wxWidgets_CONFIGURATION mswu)
19 find_package(wxWidgets COMPONENTS core base propgrid REQUIRED)
20 include(${wxWidgets_USE_FILE})
21
22 if(MSVC)
23   set(WindowsSources icinga.rc)
24 else()
25   set(WindowsSources "")
26 endif()
27
28 add_executable(icinga-studio MACOSX_BUNDLE WIN32 icinga-studio.cpp
29   forms.cpp aboutform.cpp connectform.cpp mainform.cpp
30   icinga.icns api.cpp ${WindowsSources})
31
32 include_directories(${Boost_INCLUDE_DIRS})
33 target_link_libraries(icinga-studio ${Boost_LIBRARIES} ${wxWidgets_LIBRARIES} base remote)
34
35 if(APPLE)
36   set_source_files_properties(icinga.icns PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
37 endif()
38
39 set_target_properties (
40   icinga-studio PROPERTIES
41   INSTALL_RPATH ${CMAKE_INSTALL_FULL_LIBDIR}/icinga2
42   FOLDER Bin
43   OUTPUT_NAME icinga-studio
44   MACOSX_BUNDLE_INFO_STRING "Icinga Studio"
45   MACOSX_BUNDLE_BUNDLE_NAME "Icinga Studio"
46   MACOSX_BUNDLE_GUI_IDENTIFIER "Icinga Studio"
47   MACOSX_BUNDLE_ICON_FILE icinga.icns
48   MACOSX_BUNDLE_SHORT_VERSION_STRING "${GIT_VERSION}"
49   MACOSX_BUNDLE_LONG_VERSION_STRING "${GIT_VERSION}"
50   MACOSX_BUNDLE_COPYRIGHT "(c) Icinga Development Team"
51   MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/MacOSXBundleInfo.plist.in"
52 )
53
54 if(WIN32)
55   set(InstallPath "${CMAKE_INSTALL_SBINDIR}")
56 else()
57   set(InstallPath "${CMAKE_INSTALL_BINDIR}")
58 endif()
59
60 install(
61   TARGETS icinga-studio
62   RUNTIME DESTINATION ${InstallPath}
63   BUNDLE DESTINATION ${InstallPath}
64 )
65