Repository: zookeeper Updated Branches: refs/heads/branch-3.5 8139e742a -> c89870db5
ZOOKEEPER-3025: cmake broken on windows - make `hashtable` search `include` When ZOOKEEPER-2999 removed the directory side-effect of `include_directories(include)`, and added it as a target-level include to the `zookeeper` library, this broke the Windows build. It worked on Linux (where the patch was tested) because `winconfig.h` and is not included, but on Windows, the `hashtable` library included `winconfig.h` (found in `include`) but no longer knew where to find it. The fix is to add `include` to the `hashtable` library's list of include directories. Author: Andrew Schwartzmeyer <[email protected]> Reviewers: [email protected] Closes #505 from andschwa/ZOOKEEPER-3025 Change-Id: I657f8e234082068fb7adf56dad2d68cbb4bc1d31 (cherry picked from commit cb6cae91c71b679d5bbc3fb48bf707fd1bb14493) Signed-off-by: Patrick Hunt <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/zookeeper/repo Commit: http://git-wip-us.apache.org/repos/asf/zookeeper/commit/c89870db Tree: http://git-wip-us.apache.org/repos/asf/zookeeper/tree/c89870db Diff: http://git-wip-us.apache.org/repos/asf/zookeeper/diff/c89870db Branch: refs/heads/branch-3.5 Commit: c89870db5ba158e251735a71d9f73e7c8fef652a Parents: 8139e74 Author: Andrew Schwartzmeyer <[email protected]> Authored: Mon Apr 23 17:25:44 2018 -0700 Committer: Patrick Hunt <[email protected]> Committed: Mon Apr 23 17:26:13 2018 -0700 ---------------------------------------------------------------------- src/c/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/zookeeper/blob/c89870db/src/c/CMakeLists.txt ---------------------------------------------------------------------- diff --git a/src/c/CMakeLists.txt b/src/c/CMakeLists.txt index 2884ca7..46ecf71 100644 --- a/src/c/CMakeLists.txt +++ b/src/c/CMakeLists.txt @@ -153,6 +153,7 @@ configure_file(cmake_config.h.in ${CMAKE_CURRENT_BINARY_DIR}/include/config.h) # hashtable library set(hashtable_sources src/hashtable/hashtable_itr.c src/hashtable/hashtable.c) add_library(hashtable STATIC ${hashtable_sources}) +target_include_directories(hashtable PUBLIC include) target_link_libraries(hashtable PUBLIC $<$<OR:$<PLATFORM_ID:Linux>,$<PLATFORM_ID:FreeBSD>>:m>) # zookeeper library
