diff --git a/CMakeLists.txt b/CMakeLists.txt index 8297f588b1..a595168d50 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -370,6 +370,24 @@ include(GetArchitecture) include(RequireCXX17) include(FindKqueue) +######################################################################## +## Highwayhash + +# Well, this is dirty - but it works. Copy highwayhash over to the build +# directory and build it there using make. +add_custom_target( + libhighwayhash + BYPRODUCTS ${CMAKE_BINARY_DIR}/aux/highwayhash/lib/libhighwayhash.a + DEPENDS ${CMAKE_BINARY_DIR}/aux/highwayhash + COMMAND make + WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/aux/highwayhash +) +add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/aux/highwayhash + COMMAND ${CMAKE_COMMAND} -E copy_directory + ${CMAKE_SOURCE_DIR}/aux/highwayhash ${CMAKE_BINARY_DIR}/aux/highwayhash) +include_directories(BEFORE ${CMAKE_BINARY_DIR}/aux/highwayhash) +set(zeekdeps ${zeekdeps} ${CMAKE_BINARY_DIR}/aux/highwayhash/lib/libhighwayhash.a) + if ( (OPENSSL_VERSION VERSION_EQUAL "1.1.0") OR (OPENSSL_VERSION VERSION_GREATER "1.1.0") ) set(ZEEK_HAVE_OPENSSL_1_1 true CACHE INTERNAL "" FORCE) endif() diff --git a/cmake b/cmake index 861e37c504..bad1bc7ec5 160000 --- a/cmake +++ b/cmake @@ -1 +1 @@ -Subproject commit 861e37c50410b37d08687a691d5868bfff9694dd +Subproject commit bad1bc7ec5b64a1fd1ec8ef6886e796ac49121bc diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 65bcaea776..94451173a6 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -135,24 +135,6 @@ list(APPEND BINPAC_OUTPUTS "${BINPAC_OUTPUT_CC}") binpac_target(binpac_bro-lib.pac) list(APPEND BINPAC_OUTPUTS "${BINPAC_OUTPUT_CC}") -######################################################################## -## Highwayhash - -# Well, this is dirty - but it works. Copy highwayhash over to the build -# directory and build it there using make. -add_custom_target( - libhighwayhash - BYPRODUCTS ${CMAKE_BINARY_DIR}/aux/highwayhash/lib/libhighwayhash.a - DEPENDS ${CMAKE_BINARY_DIR}/aux/highwayhash - COMMAND make - WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/aux/highwayhash -) -add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/aux/highwayhash - COMMAND ${CMAKE_COMMAND} -E copy_directory - ${CMAKE_SOURCE_DIR}/aux/highwayhash ${CMAKE_BINARY_DIR}/aux/highwayhash) -include_directories(BEFORE ${CMAKE_BINARY_DIR}/aux/highwayhash) - - ######################################################################## ## Including subdirectories. ######################################################################## @@ -356,7 +338,7 @@ set(bro_SRCS collect_headers(bro_HEADERS ${bro_SRCS}) add_executable(zeek ${bro_SRCS} ${bro_HEADERS} ${bro_SUBDIR_LIBS} ${bro_PLUGIN_LIBS}) -target_link_libraries(zeek ${zeekdeps} ${CMAKE_THREAD_LIBS_INIT} ${CMAKE_DL_LIBS} ${CMAKE_BINARY_DIR}/aux/highwayhash/lib/libhighwayhash.a) +target_link_libraries(zeek ${zeekdeps} ${CMAKE_THREAD_LIBS_INIT} ${CMAKE_DL_LIBS}) if ( NOT "${bro_LINKER_FLAGS}" STREQUAL "" ) set_target_properties(zeek PROPERTIES LINK_FLAGS "${bro_LINKER_FLAGS}")