From 7de2d1c9d63c8d1c207009537eed49dbe7654890 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Fri, 13 Apr 2018 07:37:33 -0400 Subject: [PATCH] CMakeLists: Don't dump LZO's includes into the top-level directory Instead, we add the includes to the LZO target's interface. That way only libraries that link it in can see them. --- CMakeLists.txt | 1 - Externals/LZO/CMakeLists.txt | 9 ++++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index fdbf7bae4d..0385ed4fc3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -587,7 +587,6 @@ if(LZO_FOUND) else() message(STATUS "Using static lzo from Externals") add_subdirectory(Externals/LZO) - include_directories(Externals/LZO) set(LZO lzo2) endif() diff --git a/Externals/LZO/CMakeLists.txt b/Externals/LZO/CMakeLists.txt index 78f58eff2a..48d1af1b1e 100644 --- a/Externals/LZO/CMakeLists.txt +++ b/Externals/LZO/CMakeLists.txt @@ -1 +1,8 @@ -add_library(lzo2 STATIC minilzo.c) +add_library(lzo2 STATIC + minilzo.c +) + +target_include_directories(lzo2 +PUBLIC + ${CMAKE_CURRENT_SOURCE_DIR} +)