From: Josh Date: Wed, 10 Dec 2014 17:37:34 +0000 (-0600) Subject: Fixing FindSnort.cmake X-Git-Tag: 3.0.0-233~1089^2~22 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=02a0947f2ca30aa29e1491812f50420926ff7bde;p=thirdparty%2Fsnort3.git Fixing FindSnort.cmake --- diff --git a/extra/FindSnort.cmake b/extra/FindSnort.cmake index 026346e57..5964b86c6 100644 --- a/extra/FindSnort.cmake +++ b/extra/FindSnort.cmake @@ -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 diff --git a/extra/src/CMakeLists.txt b/extra/src/CMakeLists.txt index c6099ac62..bd6aa0b02 100644 --- a/extra/src/CMakeLists.txt +++ b/extra/src/CMakeLists.txt @@ -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)