From 83b36dfc54ec528d021942f5cfbc07334e152e4e Mon Sep 17 00:00:00 2001 From: Benjamin Bannier Date: Mon, 25 Apr 2022 12:04:59 +0200 Subject: [PATCH] Include headers in binary dir before other headers. If e.g., optional dependencies are installed in the same prefix as a previous Zeek installation, the build would have previously found `zeek-config.h` from the external prefix instead of from the current build. With this patch we now include the current binary dir before any previously configured include directories (here in particular: optional dependencies). With that the correct `zeek-config.h` is found. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 721d710a35..8f347d8266 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -554,7 +554,7 @@ endif () string(TOLOWER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_LOWER) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/zeek-config.h.in ${CMAKE_CURRENT_BINARY_DIR}/zeek-config.h) -include_directories(${CMAKE_CURRENT_BINARY_DIR}) +include_directories(BEFORE ${CMAKE_CURRENT_BINARY_DIR}) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/zeek-config.h DESTINATION include/zeek) execute_process(COMMAND "${CMAKE_COMMAND}" -E create_symlink "."