]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
adding maltheizers patch. Setting minimum cmake version to 2.8.12.1
authorJosh <jrosenba@cisco.com>
Wed, 19 Nov 2014 21:36:36 +0000 (15:36 -0600)
committerJosh <jrosenba@cisco.com>
Wed, 19 Nov 2014 21:36:36 +0000 (15:36 -0600)
CMakeLists.txt
cmake/FindDNET.cmake
cmake/macros.cmake
config.cmake.h.in
doc/CMakeLists.txt

index f244a9f7f515a28cf68dde1b999cf21259baf108..ef8e28b1bee1f5e05df92a625a57aa866cdfd232 100644 (file)
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.9)
+cmake_minimum_required(VERSION 2.8.12.1)
 project (snort CXX C)
 
 set (SNORT_VERSION_MAJOR 3)
index f620cc52288eb8d1b22a9b4ca2d71c57ad11f51e..e0a31ef2c1b09d02cb73c1c135996e9223798956 100644 (file)
@@ -9,6 +9,7 @@
 #  DNET_INCLUDE_DIR - where to find dnet.h, etc.
 #  DNET_LIBRARIES   - List of libraries when using dnet.
 #  DNET_FOUND       - True if dnet found.
+#  HAVE_DUMBNET_H   - True if found dumnet rather than dnet
 
 
 
@@ -21,21 +22,45 @@ set(ERROR_MESSAGE
 )
 
 
-find_path(DNET_INCLUDE_DIR 
-  NAMES dnet.h dumbnet.h
+# Check for libdumbnet first, then libdnet
+
+find_path(DNET_INCLUDE_DIR
+  NAMES dumbnet.h
   HINTS ENV DNETDIR
 )
 
+# If we found libdument header, define HAVE_DUMBNET_H for config.h generation.
+if (DNET_INCLUDE_DIR)
+    set(HAVE_DUMBNET_H "YES")
+endif()
+
+
 # Search for library twice.  The first time using the custom path, second time
 # using standard paths
 find_library(DNET_LIBRARIES
-    NAMES dnet dumbnet
+    NAMES dumbnet
     HINTS ${DNET_LIBRARIES_DIR} # user specified option in ./configure_cmake.sh
     NO_DEFAULT_PATH
     NO_CMAKE_ENVIRONMENT_PATH
 )
 find_library(DNET_LIBRARIES
-    NAMES dnet dumbnet
+    NAMES dumbnet
+)
+
+
+find_path(DNET_INCLUDE_DIR
+  NAMES dnet.h
+  HINTS ENV DNETDIR
+)
+
+find_library(DNET_LIBRARIES
+    NAMES dnet
+    HINTS ${DNET_LIBRARIES_DIR}
+    NO_DEFAULT_PATH
+    NO_CMAKE_ENVIRONMENT_PATH
+)
+find_library(DNET_LIBRARIES
+    NAMES dnet
 )
 
 
index 10f501a62730bf109fd1d392165efd570dcfa412..a87699a0251b22cd2de6133bc397b3802002781e 100644 (file)
@@ -2,7 +2,6 @@
 
 macro (add_compile_flags library flags)
 
-
     get_target_property(TEMP ${library} COMPILE_FLAGS)
 
     if(TEMP STREQUAL "TEMP-NOTFOUND")
@@ -41,7 +40,6 @@ endmacro (add_link_flags)
 #       additional args : the library's sources.  Must have at least one source
 macro (add_shared_library libname install_path)
 
-
     set (sources ${ARGN})
 
     # Did we get any sources?
@@ -98,24 +96,28 @@ macro (set_project_compiler_defines_if_true var flag)
     endif(${var})
 endmacro (set_project_compiler_defines_if_true)
 
+
 macro (set_project_compiler_defines_if_false var flag)
     if (NOT ${var})
         add_definitions("-D${flag}")
     endif()
 endmacro (set_project_compiler_defines_if_false)
 
+
 macro (set_if_true value var)
     if (${value})
         set(${var} "YES")
     endif()
 endmacro ()
 
+
 macro (set_if_false value var)
     if(NOT ${value})
         set(${var} "YES")
     endif()
 endmacro ()
 
+
 macro (append_to_cache_variable cache_var)
 
     get_property(cache_value CACHE ${cache_var} PROPERTY VALUE)
@@ -128,19 +130,3 @@ macro (append_to_cache_variable cache_var)
 
     message(STATUS ${cache_var} " ${tmp} " CACHE " " ${cache_type} " ${cache_help_string}")
 endmacro ()
-
-
-macro (set_cache_variable cache_var)
-
-    get_property(cache_value CACHE ${cache_var} PROPERTY VALUE)
-    get_property(cache_type CACHE ${cache_var} PROPERTY TYPE)
-    get_property(cache_help_string CACHE ${cache_var} PROPERTY HELPSTRING)
-    
-    set (tmp ${cache_value} ${ARGN})
-    set(${cache_var} "${tmp}" CACHE ${cache_type} "${cache_help_string}")
-
-
-    message(STATUS ${cache_var} " ${tmp}" CACHE " " ${cache_type} " ${cache_help_string}")
-endmacro ()
-
-
index 4af5cabdf33f2de2d53450d76c99e56cc0b2b0ae..8c15316e991ef396536fef4d027054d71760b977 100644 (file)
 /* Define to 1 if you have the <wchar.h> header file. */
 #cmakedefine HAVE_WCHAR_H 1
 
+/* Define to 1 if you have the <dumbnet.h> header file. */
+#cmakedefine HAVE_DUMBNET_H 1
 
 
 
index 398f5f71d1924ced1745855780de13054314ff3e..2b06eb32f6df57fc72b75ebcba14a838f2e75bb9 100644 (file)
@@ -255,7 +255,7 @@ add_custom_command(OUTPUT snort_manual.tgz
         -E tar 
         zcf snort_manual.tgz
         ${CMAKE_CURRENT_BINARY_DIR}/snort_manual.chunked
-    DEPENDS ${ALL_SOURCES} snort_manual.html
+    DEPENDS ${ALL_SOURCES}
     COMMENT "Documents: building snort_manual.tgz"
 )