summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLéo Lam <leolino.lam@gmail.com>2018-04-07 23:31:13 +0200
committerGitHub <noreply@github.com>2018-04-07 23:31:13 +0200
commitbb38b612ba73b0db409f16057366e18f1f8ab18a (patch)
tree63f807edcaf8bc8b908c93f0b97b3c84ceac5520
parent7dff069659c2c7a9616258a4714c289bc0917165 (diff)
parenta4ba92c697951644687869122b779c9a5ad195e1 (diff)
Merge pull request #6602 from lioncash/xxhash
CMakeLists: Don't dump xxhash's includes into top-level directory scope
-rw-r--r--CMakeLists.txt1
-rw-r--r--Externals/xxhash/CMakeLists.txt8
2 files changed, 4 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 972b756f70..6a1a6f94ee 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -566,7 +566,6 @@ endif()
if(NOT XXHASH_FOUND)
message(STATUS "Using static xxhash from Externals")
add_subdirectory(Externals/xxhash)
- include_directories(Externals/xxhash)
endif()
find_package(ZLIB)
diff --git a/Externals/xxhash/CMakeLists.txt b/Externals/xxhash/CMakeLists.txt
index 475d2ca43a..8218f801d8 100644
--- a/Externals/xxhash/CMakeLists.txt
+++ b/Externals/xxhash/CMakeLists.txt
@@ -1,7 +1,7 @@
project(xxhash C)
-set(SRCS
- xxhash.c
+add_library(xxhash STATIC xxhash.c)
+target_include_directories(xxhash
+PUBLIC
+ ${CMAKE_CURRENT_SOURCE_DIR}
)
-
-add_library(xxhash STATIC ${SRCS})