[Openvas-commits] r6157 - in trunk/gsa: . src
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Thu Dec 17 07:33:01 CET 2009
Author: felix
Date: 2009-12-17 07:32:59 +0100 (Thu, 17 Dec 2009)
New Revision: 6157
Modified:
trunk/gsa/CMakeLists.txt
trunk/gsa/ChangeLog
trunk/gsa/src/CMakeLists.txt
Log:
* CMakeLists.txt: Use pkg-config module to check for correct
libmicrohttpd version.
* src/CMakeLists.txt: Added TODOs to check for other libraries using
the same mechanism as in the top-level CMakeLists.txt and to use
the proper variables at compiling and linking step.
Modified: trunk/gsa/CMakeLists.txt
===================================================================
--- trunk/gsa/CMakeLists.txt 2009-12-16 22:05:37 UTC (rev 6156)
+++ trunk/gsa/CMakeLists.txt 2009-12-17 06:32:59 UTC (rev 6157)
@@ -23,6 +23,9 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+# Needed for 'pkg_check_modules' function
+include (FindPkgConfig)
+
message ("-- Configuring greenbone-security-assistant...")
project (greenbone-security-assistant C)
@@ -70,6 +73,18 @@
# TODO: Check for libmicrohttpd, rats, flawfinder, splint, doxygen.
# (with the later 4 being optional)
+## Check for existance of required libraries
+pkg_check_modules (MHD libmicrohttpd>=0.4.2)
+
+if (NOT MHD_FOUND)
+ message (FATAL_ERROR "libmicrohttpd>=0.4.2 could not be found on "
+ "your system but is required. This library was searched
+ "for using the pkg-config tool. If you have
+ "libmicrohttpd installed, make sure that "
+ "PKG_CONFIG_PATH points to a path where "
+ "libmicrohttpd.pc can be found.")
+endif (NOT MHD_FOUND)
+
## CPack configuration
SET(CPACK_CMAKE_GENERATOR "Unix Makefiles")
Modified: trunk/gsa/ChangeLog
===================================================================
--- trunk/gsa/ChangeLog 2009-12-16 22:05:37 UTC (rev 6156)
+++ trunk/gsa/ChangeLog 2009-12-17 06:32:59 UTC (rev 6157)
@@ -1,3 +1,12 @@
+2009-12-17 Felix Wolfsteller <felix.wolfsteller at intevation.de>
+
+ * CMakeLists.txt: Use pkg-config module to check for correct
+ libmicrohttpd version.
+
+ * src/CMakeLists.txt: Added TODOs to check for other libraries using
+ the same mechanism as in the top-level CMakeLists.txt and to use
+ the proper variables at compiling and linking step.
+
2009-12-16 Matthew Mundell <matthew.mundell at intevation.de>
* src/gsad.c (init_validator): Increase credential_login max size to 40.
Modified: trunk/gsa/src/CMakeLists.txt
===================================================================
--- trunk/gsa/src/CMakeLists.txt 2009-12-16 22:05:37 UTC (rev 6156)
+++ trunk/gsa/src/CMakeLists.txt 2009-12-17 06:32:59 UTC (rev 6157)
@@ -27,6 +27,8 @@
add_definitions (-Werror)
+## TODO use pkg_check_modules instead of manual invocation (as in top-level
+## CMakeLists.txt)
exec_program (pkg-config
ARGS --cflags gthread-2.0
OUTPUT_VARIABLE GLIB_THREAD_CFLAGS)
@@ -125,6 +127,9 @@
add_definitions (-DOPENVAS_OS_NAME=\\\"${CMAKE_SYSTEM}\\\")
add_definitions (-DPREFIX=\\\"${CMAKE_INSTALL_PREFIX}\\\")
+## In the top-level CMakeLists.txt, microhttpd is searched for using
+## pkg_check_modules. Use variables set by this function as linker and compiler
+## flags.
set_target_properties (gsad PROPERTIES LINK_FLAGS
"${LIB_TEMP} -lgnutls ${GLIB_THREAD_LDFLAGS} ${GLIB_LDFLAGS} ${OPENVAS_LDFLAGS} -lmicrohttpd -pthread -lxslt ${LIBXML_LDFLAGS}")
More information about the Openvas-commits
mailing list