From: Josh Date: Wed, 10 Dec 2014 18:29:41 +0000 (-0600) Subject: updating extra snort.cmake a final time X-Git-Tag: 3.0.0-233~1089^2~20 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=da345d71eb2e197124a5f1200be9c0f6ec3b41e4;p=thirdparty%2Fsnort3.git updating extra snort.cmake a final time --- diff --git a/extra/CMakeLists.txt b/extra/CMakeLists.txt index 7af99696a..a2651d120 100644 --- a/extra/CMakeLists.txt +++ b/extra/CMakeLists.txt @@ -31,11 +31,15 @@ else (BUILD_EXTRA_PLUGINS) # add Snort++ properties to the current build string (REPLACE "-DHAVE_CONFIG_H" " " tmp_cmp_flags "${SNORT_INTERFACE_COMPILE_OPTIONS}") + string (REPLACE ";" " " tmp_cmp_flags "${tmp_cmp_flags}") string (STRIP "${CMAKE_CXX_FLAGS} ${tmp_cmp_flags}" tmp_cmp_flags) set (CMAKE_CXX_FLAGS "${tmp_cmp_flags}" CACHE STRING "Flags used by the compiler during all build types." FORCE) + include_directories(${SNORT_INTERFACE_INCLUDE_DIRECTORIES}) - string (STRIP "${CMAKE_EXE_LINKER_FLAGS} ${SNORT_INTERFACE_LINK_FLAGS}" tmp_link_flags) + + string(REPLACE ";" " " tmp_link_flags "${SNORT_INTERFACE_LINK_FLAGS}") + string (STRIP "${CMAKE_EXE_LINKER_FLAGS} ${tmp_link_flags}" tmp_link_flags) set (CMAKE_EXE_LINKER_FLAGS "${tmp_link_flags}" CACHE STRING "Flags used by the linker. " FORCE) diff --git a/extra/FindSnort.cmake b/extra/FindSnort.cmake index 7bb953139..c646a7467 100644 --- a/extra/FindSnort.cmake +++ b/extra/FindSnort.cmake @@ -25,12 +25,12 @@ # SNORT_INCLUDE_DIR - Snort include directory # # -# SNORT_INTERFACE_COMPILE_OPTIONS - Snort++'s compile options. If snort.cmake found, -# use those compile flags. Else, use -# `pkg-config snort` compile flags +# These varaibles are all lists whose variables are retrieved from either +# snort.cmake or pkg-config. snort.cmake will always take precendence over pkg-config. +# SNORT_INTERFACE_COMPILE_OPTIONS - a list of Snort++'s compile options. # SNORT_INTERFACE_INCLUDE_DIRECTORIES - The directories that Snort++ includes -# when building. retrieved from snort.cmake -# SNORT_INTERFACE_LINK_FLAGS - Snort++ link flags. retrived from `pkg-config` +# when building. +# SNORT_INTERFACE_LINK_FLAGS - Snort++ link flags. only available with `pkg-config` # set(ERROR_MESSAGE @@ -95,20 +95,17 @@ 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_OTHER}") - set (SNORT_INTERFACE_COMPILE_OPTIONS "${tmp_cflags}" CACHE STRING + set (SNORT_INTERFACE_COMPILE_OPTIONS "${SNORT_PKG_CFLAGS_OTHER}" CACHE STRING "The compile options with which Snort was linked" FORCE) endif() if (NOT SNORT_INTERFACE_INCLUDE_DIRECTORIES) - string(REPLACE ";" " " tmp_includes "${SNORT_PKG_INCLUDE_DIRS}") - set (SNORT_INTERFACE_INCLUDE_DIRECTORIES "${tmp_includes}" CACHE STRING + set (SNORT_INTERFACE_INCLUDE_DIRECTORIES "${SNORT_PKG_INCLUDE_DIRS}" CACHE STRING "The compile options with which Snort was linked" FORCE) endif() # add Snort link flags - string(REPLACE ";" " " tmp_lflags "${SNORT_PKG_LDFLAGS}") - set (SNORT_INTERFACE_LINK_FLAGS "${tmp_lflags}" + set (SNORT_INTERFACE_LINK_FLAGS "${SNORT_PKG_LDFLAGS}" CACHE STRING "The link flags with which the Snort++ binary was linked" FORCE)