From 8c83e15404856c2ff8bb3bd08b5f40f4c703045e Mon Sep 17 00:00:00 2001 From: Mathis Logemann Date: Thu, 23 Sep 2021 19:28:40 +0200 Subject: [PATCH] [CMake] fix export plugin file naming --- cmake/MapnikExport.cmake | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/cmake/MapnikExport.cmake b/cmake/MapnikExport.cmake index d7175129a..90711ab28 100644 --- a/cmake/MapnikExport.cmake +++ b/cmake/MapnikExport.cmake @@ -42,15 +42,16 @@ install(EXPORT MapnikTargets # some package managers are using different paths per configuration. string(TOLOWER "${CMAKE_BUILD_TYPE}" _build_type) string(TOUPPER "${CMAKE_BUILD_TYPE}" _build_type_l) -file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/mapnikPlugins-${_build_type}.cmake.in "set(MAPNIK_PLUGINS_DIR_${_build_type_l} \"@PACKAGE_PLUGINS_INSTALL_DIR@\" CACHE STRING \"\")\n") +set(_mapnik_plugin_file_name "mapnikPlugins-${_build_type}") +file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/${_mapnik_plugin_file_name}.cmake.in "set(MAPNIK_PLUGINS_DIR_${_build_type_l} \"@PACKAGE_PLUGINS_INSTALL_DIR@\" CACHE STRING \"\")\n") include(CMakePackageConfigHelpers) configure_package_config_file( - ${CMAKE_CURRENT_BINARY_DIR}/mapnikPlugins-${_build_type}.cmake.in - ${CMAKE_CURRENT_BINARY_DIR}/mapnikPlugins-${_build_type}.cmake + ${CMAKE_CURRENT_BINARY_DIR}/${_mapnik_plugin_file_name}.cmake.in + ${CMAKE_CURRENT_BINARY_DIR}/${_mapnik_plugin_file_name}.cmake PATH_VARS PLUGINS_INSTALL_DIR INSTALL_DESTINATION ${MAPNIK_CMAKE_DIR} ) install( - FILES ${CMAKE_CURRENT_BINARY_DIR}/MapnikPlugins-${_build_type}.cmake + FILES ${CMAKE_CURRENT_BINARY_DIR}/${_mapnik_plugin_file_name}.cmake DESTINATION ${MAPNIK_CMAKE_DIR} )