From a2b40753c332d49e49af438186bbd2887f4dbbed Mon Sep 17 00:00:00 2001 From: Martchus Date: Thu, 20 Jun 2019 22:53:03 +0200 Subject: [PATCH] Adapt adding include dirs to c++utilities 5 --- CMakeLists.txt | 6 ------ lib/CMakeLists.txt | 10 ++++------ 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1cc5e08..24f7511 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -50,12 +50,6 @@ endif() set(CONFIGURATION_PACKAGE_SUFFIX "" CACHE STRING "sets the suffix for find_package() calls to packages configured via c++utilities") find_package(c++utilities${CONFIGURATION_PACKAGE_SUFFIX} 5.0.0 REQUIRED) -# use the source directory of c++utilities for includes rather than the location where headers are going to be installed -# note: this enables the tests to find the header files for c++utilities in case it is built within the same project -if(CPP_UTILITIES_SOURCE_DIR) - set(CPP_UTILITIES_INCLUDE_DIRS "${CPP_UTILITIES_SOURCE_DIR}/..") -endif() - # find RapidJSON find_package(RapidJSON) if(NOT RapidJSON_FOUND) diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index 5832523..9a2cfb1 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -40,17 +40,15 @@ list(APPEND TEST_SRC_FILES # add (only) the CMake module and include dirs for c++utilities because we're not depending on the actual library list(APPEND CMAKE_MODULE_PATH ${CPP_UTILITIES_MODULE_DIRS}) if (CPP_UTILITIES_SOURCE_DIR) - list(APPEND PUBLIC_SHARED_INCLUDE_DIRS "${CPP_UTILITIES_SOURCE_DIR}/..") - list(APPEND PUBLIC_STATIC_INCLUDE_DIRS "${CPP_UTILITIES_SOURCE_DIR}/..") + list(APPEND PUBLIC_INCLUDE_DIRS $ + $) else () - list(APPEND PUBLIC_SHARED_INCLUDE_DIRS "${CPP_UTILITIES_INCLUDE_DIRS}") - list(APPEND PUBLIC_STATIC_INCLUDE_DIRS "${CPP_UTILITIES_INCLUDE_DIRS}") + list(APPEND PUBLIC_INCLUDE_DIRS "${CPP_UTILITIES_INCLUDE_DIRS}") endif () # find RapidJSON, also add only the include dirs because RapidJSON is a header-only library if (RapidJSON_FOUND) - list(APPEND PUBLIC_SHARED_INCLUDE_DIRS ${RAPIDJSON_INCLUDE_DIRS}) - list(APPEND PUBLIC_STATIC_INCLUDE_DIRS ${RAPIDJSON_INCLUDE_DIRS}) + list(APPEND PUBLIC_INCLUDE_DIRS ${RAPIDJSON_INCLUDE_DIRS}) endif () # include modules to apply configuration