]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
Fixing FindSnort.cmake
authorJosh <jrosenba@cisco.com>
Wed, 10 Dec 2014 17:37:34 +0000 (11:37 -0600)
committerJosh <jrosenba@cisco.com>
Wed, 10 Dec 2014 17:37:34 +0000 (11:37 -0600)
extra/FindSnort.cmake
extra/src/CMakeLists.txt

index 026346e5755dad0e9b523e302a4881d7f7e0d584..5964b86c66615d68fd2e9c537d28d419a6c4d65f 100644 (file)
@@ -35,7 +35,7 @@
 
 set(ERROR_MESSAGE
     "
-    Unable to find Snort!!! Either
+    Unable to find Snort! Either
     
     1)  Using ccmake, manually set the cmake variables
         SNORT_INCLUDE_DIR and SNORT_EXECUTABLE.
@@ -51,7 +51,7 @@ set(ERROR_MESSAGE
         variable SNORT_IMPORT_FILE using either ccmake or the
         command line (-DSNORT_IMPORT_FILE=/full/install/path/lib/snort/snort.cmake)
 
-    5)  install pkg-config and add snort.pc to the PKG_CONFIG_PATH
+    5)  install pkg-config and add the path to snort.pc to the PKG_CONFIG_PATH
             environment variable.
 
     "
@@ -95,11 +95,16 @@ if (PKG_CONFIG_FOUND)
 
         #  CMake file takes precedence over pkg-config file
         if (NOT SNORT_INTERFACE_COMPILE_OPTIONS)
-            string(REPLACE ";" " " tmp_cflags "${SNORT_PKG_CFLAGS}")
+            string(REPLACE ";" " " tmp_cflags "${SNORT_PKG_CFLAGS_OTHER}")
             set (SNORT_INTERFACE_COMPILE_OPTIONS "${tmp_cflags}" CACHE STRING
                 "The compile options with which Snort was linked" FORCE)
         endif()
 
+        if (NOT SNORT_INTERFACE_INCLUDE_DIRECTORIES)
+            string(REPLACE ";" " " tmp_includes "${SNORT_PKG_CFLAGS_OTHER}")
+            set (SNORT_INTERFACE_INCLUDE_DIRECTORIES "${tmp_includes}" CACHE STRING
+                "The compile options with which Snort was linked" FORCE)
+        endif()
 
         #  add Snort link flags
         string(REPLACE ";" " " tmp_lflags "${SNORT_PKG_LDFLAGS}")
@@ -128,7 +133,6 @@ find_program (SNORT_EXECUTABLE
     PATH_SUFFIXES bin   # necessary when SNORT_DIR is set
 )
 
-
 include(FindPackageHandleStandardArgs)
 find_package_handle_standard_args( Snort
     REQUIRED_VARS SNORT_INCLUDE_DIR SNORT_EXECUTABLE
index c6099ac6277c36fa8c2767050af79bf135d936a4..bd6aa0b02ab8ee0a5d417e762f21467f10d46a0d 100644 (file)
@@ -65,8 +65,9 @@ if (BUILD_EXTRA_PLUGINS)
 
 
 else (BUILD_EXTRA_PLUGINS)
+    include_directories (AFTER ${DAQ_INCLUDE_DIR})
     include_directories (BEFORE ${LUAJIT_INCLUDE_DIR})
-    include_directories (${SNORT_INCLUDE_DIR})
+    include_directories (BEFORE ${SNORT_INCLUDE_DIR})
     set (EX_INSTALL_PATH "lib/snort_extra")
 
 endif (BUILD_EXTRA_PLUGINS)