From ecce539a187d75a0c68e3636ec4b720c2ffc0ea4 Mon Sep 17 00:00:00 2001 From: Martchus Date: Wed, 24 May 2017 23:29:17 +0200 Subject: [PATCH] Do not set global include dirs TODO: Set include dirs on target level --- cmake/modules/3rdParty.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/modules/3rdParty.cmake b/cmake/modules/3rdParty.cmake index 6a02109..053016e 100644 --- a/cmake/modules/3rdParty.cmake +++ b/cmake/modules/3rdParty.cmake @@ -116,7 +116,7 @@ if(NOT DEFINED THIRD_PARTY_MODULE_LOADED) # internally used by use_external_library_from_package to find dynamic libraries configure_dynamic_library_suffixes() find_package(${PKGNAME} ${COMPAT_VERSION}) - include_directories(${${INCLUDE_VAR}}) + set(${NAME}_DYNAMIC_INCLUDE_DIR ${${INCLUDE_VAR}} PARENT_SCOPE) set(${NAME}_DYNAMIC_LIB ${${LIBRARY_VAR}} PARENT_SCOPE) endfunction() @@ -124,7 +124,7 @@ if(NOT DEFINED THIRD_PARTY_MODULE_LOADED) # internally used by use_external_library_from_package to find static libraries configure_static_library_suffixes() find_package(${PKGNAME} ${COMPAT_VERSION}) - include_directories(${${INCLUDE_VAR}}) + set(${NAME}_STATIC_INCLUDE_DIR ${${INCLUDE_VAR}} PARENT_SCOPE) set(${NAME}_STATIC_LIB ${${LIBRARY_VAR}} PARENT_SCOPE) endfunction()