]> granicus.if.org Git - icinga2/blobdiff - lib/CMakeLists.txt
ApiListener#ApiTimerHandler(): delete all replayed logs
[icinga2] / lib / CMakeLists.txt
index 334d9709dcdd88032e530cc370ac833275f08ebb..8c0fe2cfb322fc04c8888f729efee07dec719cf3 100644 (file)
@@ -1,5 +1,5 @@
 # Icinga 2
-# Copyright (C) 2012-2017 Icinga Development Team (https://www.icinga.com/)
+# Copyright (C) 2012-2018 Icinga Development Team (https://icinga.com/)
 #
 # This program is free software; you can redistribute it and/or
 # modify it under the terms of the GNU General Public License
@@ -22,10 +22,6 @@ add_subdirectory(remote)
 add_subdirectory(icinga)
 add_subdirectory(methods)
 
-if(ICINGA2_WITH_HELLO)
-  add_subdirectory(hello)
-endif()
-
 if(ICINGA2_WITH_CHECKER)
   add_subdirectory(checker)
 endif()
@@ -39,15 +35,25 @@ if(ICINGA2_WITH_MYSQL OR ICINGA2_WITH_PGSQL)
 endif()
 
 if(ICINGA2_WITH_MYSQL)
-  add_subdirectory(db_ido_mysql)
+  find_package(MySQL)
+
+  if(MYSQL_FOUND)
+    add_subdirectory(db_ido_mysql)
+    add_subdirectory(mysql_shim)
+  else()
+    message(FATAL_ERROR "You have selected MySQL support, but MySQL could not be found. You can disable the MySQL IDO module using -DICINGA2_WITH_MYSQL=OFF.")
+  endif()
 endif()
 
 if(ICINGA2_WITH_PGSQL)
-  add_subdirectory(db_ido_pgsql)
-endif()
+  find_package(PostgreSQL)
 
-if(ICINGA2_WITH_DEMO)
-  add_subdirectory(demo)
+  if(PostgreSQL_FOUND)
+    add_subdirectory(db_ido_pgsql)
+    add_subdirectory(pgsql_shim)
+  else()
+    message(FATAL_ERROR "You have selected PostgreSQL support, but PostgreSQL could not be found. You can disable the PostgreSQL IDO module using -DICINGA2_WITH_PGSQL=OFF.")
+  endif()
 endif()
 
 if(ICINGA2_WITH_LIVESTATUS)
@@ -62,8 +68,4 @@ if(ICINGA2_WITH_PERFDATA)
   add_subdirectory(perfdata)
 endif()
 
-if(ICINGA2_WITH_REDIS)
-  add_subdirectory(redis)
-endif()
-
 set(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "${CPACK_NSIS_EXTRA_INSTALL_COMMANDS}" PARENT_SCOPE)