]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
Merge pull request #2092 in SNORT/snort3 from ~MIALTIZE/snort3:no_uuid to master
authorMichael Altizer (mialtize) <mialtize@cisco.com>
Fri, 20 Mar 2020 23:14:35 +0000 (23:14 +0000)
committerMichael Altizer (mialtize) <mialtize@cisco.com>
Fri, 20 Mar 2020 23:14:35 +0000 (23:14 +0000)
Squashed commit of the following:

commit 39849097efee6f2e6cad02c598424ea46792d8c1
Author: Michael Altizer <mialtize@cisco.com>
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 <jlay@slave-tothe-box.net> for reporting the issue.

src/CMakeLists.txt

index edc6a765b4879b7faccb513a9424a21f222d2307..e9455b3c0c39c91634df73aeaa3e0eac89937060 100644 (file)
@@ -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})