From 5287c234d607b87a39bc39dde9f79541483cc06c Mon Sep 17 00:00:00 2001 From: Mathis Logemann Date: Wed, 22 Sep 2021 21:39:04 +0200 Subject: [PATCH] [CMake] fix resulting config when no plugins are build --- cmake/MapnikExport.cmake | 3 +-- cmake/mapnikConfig.cmake.in | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/cmake/MapnikExport.cmake b/cmake/MapnikExport.cmake index 89cba1391..28d5eef6f 100644 --- a/cmake/MapnikExport.cmake +++ b/cmake/MapnikExport.cmake @@ -1,7 +1,6 @@ include(CMakePackageConfigHelpers) # set the cmake targets install location -set(INCLUDE_INSTALL_DIR include/) write_basic_package_version_file( "${CMAKE_CURRENT_BINARY_DIR}/mapnikConfigVersion.cmake" VERSION ${PROJECT_VERSION} @@ -12,7 +11,7 @@ list(JOIN MAPNIK_DEPENDENCIES "\n" MAPNIK_DEPENDENCIES) configure_package_config_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/mapnikConfig.cmake.in "${CMAKE_CURRENT_BINARY_DIR}/mapnikConfig.cmake" INSTALL_DESTINATION ${MAPNIK_CMAKE_DIR} - PATH_VARS INCLUDE_INSTALL_DIR PLUGINS_INSTALL_DIR FONTS_INSTALL_DIR MAPNIK_DEPENDENCIES MAPNIK_UTILITIES + PATH_VARS MAPNIK_INCLUDE_DIR PLUGINS_INSTALL_DIR FONTS_INSTALL_DIR MAPNIK_DEPENDENCIES MAPNIK_UTILITIES NO_CHECK_REQUIRED_COMPONENTS_MACRO ) diff --git a/cmake/mapnikConfig.cmake.in b/cmake/mapnikConfig.cmake.in index b202abf28..7c4887109 100644 --- a/cmake/mapnikConfig.cmake.in +++ b/cmake/mapnikConfig.cmake.in @@ -1,8 +1,8 @@ @PACKAGE_INIT@ -set_and_check(MAPNIK_INCLUDE_DIR "@PACKAGE_INCLUDE_INSTALL_DIR@" CACHE STRING "") -set_and_check(MAPNIK_PLUGINS_DIR "@PACKAGE_PLUGINS_INSTALL_DIR@" CACHE STRING "") +set_and_check(MAPNIK_INCLUDE_DIR "@PACKAGE_MAPNIK_INCLUDE_DIR@" CACHE STRING "") set_and_check(MAPNIK_FONTS_DIR "@PACKAGE_FONTS_INSTALL_DIR@" CACHE STRING "") +set(MAPNIK_PLUGINS_DIR "@PACKAGE_PLUGINS_INSTALL_DIR@" CACHE STRING "") set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_LIST_DIR}/Modules/")