From: Michael Altizer (mialtize) Date: Fri, 20 Mar 2020 23:14:35 +0000 (+0000) Subject: Merge pull request #2092 in SNORT/snort3 from ~MIALTIZE/snort3:no_uuid to master X-Git-Tag: 3.0.0-270~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0b77c7aacc393bb38bfec104b67e382f17a8440c;p=thirdparty%2Fsnort3.git Merge pull request #2092 in SNORT/snort3 from ~MIALTIZE/snort3:no_uuid to master Squashed commit of the following: commit 39849097efee6f2e6cad02c598424ea46792d8c1 Author: Michael Altizer Date: Fri Mar 20 12:17:19 2020 -0400 build: Don't try to use libuuid headers/libraries when not found The updated FindUUID macros properly set the libuuid variables to NOTFOUND, which exposed the places where they were being unconditionally used. This properly conditionalizes that usage. Thanks to James Lay for reporting the issue. --- diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index edc6a765b..e9455b3c0 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -11,7 +11,6 @@ set(EXTERNAL_LIBRARIES ${OPENSSL_CRYPTO_LIBRARY} ${PCAP_LIBRARIES} ${PCRE_LIBRARIES} - ${UUID_LIBRARY} ${ZLIB_LIBRARIES} ) @@ -22,7 +21,6 @@ set(EXTERNAL_INCLUDES ${OPENSSL_INCLUDE_DIR} ${PCAP_INCLUDE_DIR} ${PCRE_INCLUDE_DIR} - ${UUID_INCLUDE_DIR} ${ZLIB_INCLUDE_DIRS} ) @@ -43,6 +41,11 @@ if ( HAVE_SAFEC ) LIST(APPEND EXTERNAL_INCLUDES ${SAFEC_INCLUDE_DIR}) endif () +if ( HAVE_UUID ) + LIST(APPEND EXTERNAL_LIBRARIES ${UUID_LIBRARY}) + LIST(APPEND EXTERNAL_INCLUDES ${UUID_INCLUDE_DIR}) +endif () + if ( HS_FOUND ) LIST(APPEND EXTERNAL_LIBRARIES ${HS_LIBRARIES}) LIST(APPEND EXTERNAL_INCLUDES ${HS_INCLUDE_DIRS})