From: Josh Date: Tue, 22 Apr 2014 12:58:36 +0000 (-0400) Subject: Cmake now changes library when switching ENABLE_STATIC_DAQ between on/off X-Git-Tag: 3.0.0-233~1558 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dd36ed77ec0c7eec22ff212c8f4fba1833819101;p=thirdparty%2Fsnort3.git Cmake now changes library when switching ENABLE_STATIC_DAQ between on/off --- diff --git a/cmake/setConfigureOptions.txt b/cmake/setConfigureOptions.txt index f34e0b3f8..003bccf34 100644 --- a/cmake/setConfigureOptions.txt +++ b/cmake/setConfigureOptions.txt @@ -122,6 +122,15 @@ if ("${CMAKE_GENERATOR}" MATCHES "Xcode") endif() - -#add_definitions(-DHAVE_DAQ_ADDRESS_SPACE_ID) +# This code resets the DAQ libraries so cmake will now search for the static/shared DAQ library +if(DEFINED STATIC_DAQ_PRREVIOUSLY_ENABLED) + if(NOT (ENABLE-STATIC_DAQ STREQUAL STATIC_DAQ_PRREVIOUSLY_ENABLED)) + unset(DAQ_FOUND CACHE) + unset(DAQ_LIBRARY CACHE) + unset(DAQ_LIBRARIES CACHE) + set(STATIC_DAQ_PRREVIOUSLY_ENABLED "${ENABLE_STATIC_DAQ}" CACHE INTERNAL "save daq link type" FORCE) + endif() +else() + set(STATIC_DAQ_PRREVIOUSLY_ENABLED "${ENABLE_STATIC_DAQ}" CACHE INTERNAL "save daq link type" FORCE) +endif()