[Openvas-commits] r6079 - trunk/gsa

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Mon Dec 7 15:16:34 CET 2009


Author: felix
Date: 2009-12-07 15:16:33 +0100 (Mon, 07 Dec 2009)
New Revision: 6079

Modified:
   trunk/gsa/CMakeLists.txt
   trunk/gsa/ChangeLog
Log:
* CMakeLists.txt: Added checks for pkg-config and libopenvas-config.


Modified: trunk/gsa/CMakeLists.txt
===================================================================
--- trunk/gsa/CMakeLists.txt	2009-12-07 11:04:50 UTC (rev 6078)
+++ trunk/gsa/CMakeLists.txt	2009-12-07 14:16:33 UTC (rev 6079)
@@ -35,6 +35,41 @@
 
 SET (CMAKE_BUILD_TYPE debug)
 
+## Check existence required tools
+
+SET (MANDATORY_TOOL_MISSING FALSE)
+
+FIND_PROGRAM(PATH_TO_PKGCONFIG pkgo-config DOC "pkg-config program to retrieve "
+                        "information about installed libraries in the system.")
+
+FIND_PROGRAM(PATH_TO_LIBOPENVASCONFIG libopenvas-config DOC "libopenvas-config program"
+                        " to retrieve information about installed"
+                        " openvas-libraries in the system.")
+
+MESSAGE(STATUS "Looking for pkg-config... ${PATH_TO_PKGCONFIG}")
+IF(NOT PATH_TO_PKGCONFIG)
+  SET(MANDATORY_TOOL_MISSING TRUE)
+ENDIF(NOT PATH_TO_PKGCONFIG)
+
+MESSAGE(STATUS "Looking for libopenvas-config... ${PATH_TO_LIBOPENVASCONFIG}")
+IF(NOT PATH_TO_LIBOPENVASCONFIG)
+  SET(MANDATORY_TOOL_MISSING TRUE)
+ENDIF(NOT PATH_TO_LIBOPENVASCONFIG)
+
+IF(MANDATORY_TOOL_MISSING)
+  MESSAGE("One or more tools or libraries could not be found on your system:")
+  IF(NOT PATH_TO_PKGCONFIG)
+    MESSAGE(FATAL_ERROR "  - The pkg-config tool is required.")
+  ENDIF(NOT PATH_TO_PKGCONFIG)
+  IF(NOT PATH_TO_LIBOPENVASCONFIG)
+     MESSAGE(FATAL_ERROR "  - The libopenvas-config tool is required (part of "
+                         "openvas-libraries).")
+  ENDIF(NOT PATH_TO_LIBOPENVASCONFIG)
+ENDIF(MANDATORY_TOOL_MISSING)
+
+# TODO: Check for libmicrohttpd, rats, flawfinder, splint, doxygen.
+#       (with the later 4 being optional)
+
 ## CPack configuration
 
 SET(CPACK_CMAKE_GENERATOR "Unix Makefiles")

Modified: trunk/gsa/ChangeLog
===================================================================
--- trunk/gsa/ChangeLog	2009-12-07 11:04:50 UTC (rev 6078)
+++ trunk/gsa/ChangeLog	2009-12-07 14:16:33 UTC (rev 6079)
@@ -1,3 +1,7 @@
+2009-12-07  Felix Wolfsteller <felix.wolfsteller at intevation.de>
+
+	* CMakeLists.txt: Added checks for pkg-config and libopenvas-config.
+
 2009-12-03  Michael Wiegand <michael.wiegand at intevation.de>
 
 	Added initial NVT feed synchronization support.



More information about the Openvas-commits mailing list