From a89447686cb2e530d9140a475974fca35342242a Mon Sep 17 00:00:00 2001 From: Mathis Logemann Date: Wed, 13 Oct 2021 17:47:38 +0200 Subject: [PATCH] remove mapnik-config --- utils/CMakeLists.txt | 2 -- utils/mapnik-config/CMakeLists.txt | 34 ------------------------------ 2 files changed, 36 deletions(-) delete mode 100644 utils/mapnik-config/CMakeLists.txt diff --git a/utils/CMakeLists.txt b/utils/CMakeLists.txt index facf3cdeb..6b533898b 100644 --- a/utils/CMakeLists.txt +++ b/utils/CMakeLists.txt @@ -20,5 +20,3 @@ endif() if(BUILD_UTILITY_SVG2PNG) add_subdirectory(svg2png) endif() - -add_subdirectory(mapnik-config) diff --git a/utils/mapnik-config/CMakeLists.txt b/utils/mapnik-config/CMakeLists.txt deleted file mode 100644 index 7d71c1fc5..000000000 --- a/utils/mapnik-config/CMakeLists.txt +++ /dev/null @@ -1,34 +0,0 @@ -# to keep compability with SCons we need to read the file and replace the values. -file(READ mapnik-config.template.sh _template) - -string(REPLACE "CONFIG_MAPNIK_VERSION=\"unknown\"" "CONFIG_MAPNIK_VERSION=\"${CMAKE_PROJECT_VERSION}\"" _template ${_template}) -string(REPLACE "CONFIG_MAPNIK_VERSION_STRING=\"unknown\"" "CONFIG_MAPNIK_VERSION_STRING=\"${CMAKE_PROJECT_VERSION}\"" _template ${_template}) - -get_filename_component(_cxx_compiler ${CMAKE_CXX_COMPILER} NAME_WE) -string(REPLACE "CONFIG_CXX=\"c++\"" "CONFIG_CXX=\"${_cxx_compiler}\"" _template ${_template}) - -get_target_property(_compile_defs core INTERFACE_COMPILE_DEFINITIONS) -string(JOIN " -D" _str_compile_defs ${_compile_defs}) -if(_str_compile_defs) - set(_str_compile_defs "-D${_str_compile_defs}") - string(REPLACE "CONFIG_DEFINES=" "CONFIG_DEFINES=\"${_str_compile_defs}\"" _template ${_template}) -endif() - - -execute_process(COMMAND git rev-list --max-count=1 HEAD OUTPUT_VARIABLE _git_rev ERROR_VARIABLE _git_rev_err WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}) -execute_process(COMMAND git describe HEAD OUTPUT_VARIABLE _git_desc ERROR_VARIABLE _git_desc_err WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}) -message(STATUS "mapnik-config: _git_rev: ${_git_rev}") -message(STATUS "mapnik-config: _git_rev_err: ${_git_rev_err}") -message(STATUS "mapnik-config: _git_desc: ${_git_desc}") -message(STATUS "mapnik-config: _git_desc_err: ${_git_desc_err}") -if(NOT _git_rev_err) - string(REGEX REPLACE "\n$" "" _git_rev "${_git_rev}") - string(REPLACE "CONFIG_GIT_REVISION=\"N/A\"" "CONFIG_GIT_REVISION=\"${_git_rev}\"" _template ${_template}) -endif() -if(NOT _git_desc_err) - string(REGEX REPLACE "\n$" "" _git_desc "${_git_desc}") - string(REPLACE "CONFIG_GIT_DESCRIBE=\"\${CONFIG_MAPNIK_VERSION_STRING}\"" "CONFIG_GIT_DESCRIBE=\"${_git_desc}\"" _template ${_template}) -endif() - -file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/mapnik-config" ${_template}) -install(FILES "${CMAKE_CURRENT_BINARY_DIR}/mapnik-config" DESTINATION ${MAPNIK_BIN_DIR} COMPONENT MapnikRuntime)