From 6f4e18542390a3a4fcdf4df1b1b94a388190f483 Mon Sep 17 00:00:00 2001 From: Tobias Mayer Date: Wed, 27 May 2020 11:41:48 +0200 Subject: [PATCH] Fix target file include paths If the project is generated with a custom `CMAKE_INSTALL_INCLUDEDIR`, the generated target properties would point to the wrong location. --- CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3a487ce7..53eb7157 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -196,9 +196,10 @@ endif () target_compile_features(fmt INTERFACE ${FMT_REQUIRED_FEATURES}) +include(GNUInstallDirs) target_include_directories(fmt PUBLIC $ - $) + $) set(FMT_DEBUG_POSTFIX d CACHE STRING "Debug library postfix.") @@ -233,11 +234,10 @@ target_compile_features(fmt-header-only INTERFACE ${FMT_REQUIRED_FEATURES}) target_include_directories(fmt-header-only INTERFACE $ - $) + $) # Install targets. if (FMT_INSTALL) - include(GNUInstallDirs) include(CMakePackageConfigHelpers) set_verbose(FMT_CMAKE_DIR ${CMAKE_INSTALL_LIBDIR}/cmake/fmt CACHE STRING "Installation directory for cmake files, a relative path "