diff --git a/CMakeLists.txt b/CMakeLists.txt index fd1d463e7..db78d5357 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -341,27 +341,35 @@ include(CMakePackageConfigHelpers) # set the cmake targets install location set(INCLUDE_INSTALL_DIR include/) write_basic_package_version_file( - "${CMAKE_CURRENT_BINARY_DIR}/MapnikConfigVersion.cmake" + "${CMAKE_CURRENT_BINARY_DIR}/mapnikConfigVersion.cmake" VERSION ${PROJECT_VERSION} COMPATIBILITY SameMajorVersion ) 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" +configure_package_config_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/mapnikConfig.cmake.in + "${CMAKE_CURRENT_BINARY_DIR}/mapnikConfig.cmake" INSTALL_DESTINATION ${INSTALL_CMAKE_DIR} PATH_VARS INCLUDE_INSTALL_DIR PLUGINS_INSTALL_DIR FONTS_INSTALL_DIR MAPNIK_DEPENDENCIES ) -install(FILES - "${CMAKE_CURRENT_BINARY_DIR}/MapnikConfig.cmake" - "${CMAKE_CURRENT_BINARY_DIR}/MapnikConfigVersion.cmake" - DESTINATION ${INSTALL_CMAKE_DIR} +install( + FILES + "${CMAKE_CURRENT_BINARY_DIR}/mapnikConfig.cmake" + "${CMAKE_CURRENT_BINARY_DIR}/mapnikConfigVersion.cmake" + DESTINATION ${INSTALL_CMAKE_DIR} +) + +install( + FILES + "${CMAKE_CURRENT_SOURCE_DIR}/cmake/FindCairo.cmake" + "${CMAKE_CURRENT_SOURCE_DIR}/cmake/FindWebP.cmake" + "${CMAKE_CURRENT_SOURCE_DIR}/cmake/FindHarfBuzz.cmake" + DESTINATION ${INSTALL_CMAKE_DIR}/Modules ) -install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/cmake/FindCairo.cmake" DESTINATION ${INSTALL_CMAKE_DIR}/Modules) install(EXPORT MapnikTargets - FILE MapnikTargets.cmake + FILE mapnikTargets.cmake NAMESPACE mapnik:: DESTINATION ${INSTALL_CMAKE_DIR} ) diff --git a/cmake/MapnikConfig.cmake.in b/cmake/mapnikConfig.cmake.in similarity index 88% rename from cmake/MapnikConfig.cmake.in rename to cmake/mapnikConfig.cmake.in index 74071d493..8e724e9ff 100644 --- a/cmake/MapnikConfig.cmake.in +++ b/cmake/mapnikConfig.cmake.in @@ -10,6 +10,6 @@ include(CMakeFindDependencyMacro) @MAPNIK_DEPENDENCIES@ -include("${CMAKE_CURRENT_LIST_DIR}/MapnikTargets.cmake") +include("${CMAKE_CURRENT_LIST_DIR}/mapnikTargets.cmake") check_required_components(mapnik) diff --git a/docs/cmake-usage.md b/docs/cmake-usage.md index 57de8f507..e62402c68 100644 --- a/docs/cmake-usage.md +++ b/docs/cmake-usage.md @@ -28,7 +28,7 @@ find_package(mapnik CONFIG REQUIRED) target_link_libraries(mytarget ... mapnik::core mapnik::mapnik) ``` -All mapnik executables and targets are exported within `MapnikTargets.cmake`. +All mapnik executables and targets are exported within `mapnikTargets.cmake`. The plugin dir is available in the variable `MAPNIK_PLUGINS_DIR`. The font path is is available in the variable `MAPNIK_FONTS_DIR`.