2020-11-21 10:34:45 +00:00
|
|
|
@PACKAGE_INIT@
|
|
|
|
|
2021-09-22 19:39:04 +00:00
|
|
|
set_and_check(MAPNIK_INCLUDE_DIR "@PACKAGE_MAPNIK_INCLUDE_DIR@" CACHE STRING "")
|
2020-11-22 21:02:17 +00:00
|
|
|
set_and_check(MAPNIK_FONTS_DIR "@PACKAGE_FONTS_INSTALL_DIR@" CACHE STRING "")
|
2020-11-22 21:01:33 +00:00
|
|
|
|
2021-03-17 21:18:21 +00:00
|
|
|
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_LIST_DIR}/Modules/")
|
|
|
|
|
|
|
|
include(CMakeFindDependencyMacro)
|
2021-10-25 16:58:55 +00:00
|
|
|
|
|
|
|
find_dependency(Threads REQUIRED)
|
2021-03-17 21:18:21 +00:00
|
|
|
@MAPNIK_DEPENDENCIES@
|
|
|
|
|
2021-07-21 18:03:42 +00:00
|
|
|
include("${CMAKE_CURRENT_LIST_DIR}/mapnikTargets.cmake")
|
2020-11-21 10:34:45 +00:00
|
|
|
|
2021-09-22 18:49:44 +00:00
|
|
|
set(_supported_components @MAPNIK_UTILITIES@)
|
|
|
|
foreach(_comp ${mapnik_FIND_COMPONENTS})
|
|
|
|
if (NOT _comp IN_LIST _supported_components)
|
|
|
|
set(mapnik_FOUND False)
|
|
|
|
set(mapnik_NOT_FOUND_MESSAGE "Unsupported component: ${_comp}")
|
|
|
|
endif()
|
2021-09-23 08:33:32 +00:00
|
|
|
include("${CMAKE_CURRENT_LIST_DIR}/mapnikUtilityTargets_${_comp}.cmake")
|
2021-09-22 18:49:44 +00:00
|
|
|
endforeach()
|
2021-09-23 08:33:32 +00:00
|
|
|
|
|
|
|
|
|
|
|
get_filename_component(_plugin_dir "${CMAKE_CURRENT_LIST_FILE}" PATH)
|
|
|
|
file(GLOB CONFIG_FILES "${_plugin_dir}/mapnikPlugins-*.cmake")
|
|
|
|
foreach(f ${CONFIG_FILES})
|
|
|
|
include(${f})
|
|
|
|
endforeach()
|
|
|
|
|
|
|
|
function(mapnik_find_plugin_dir PLUGIN_DIR)
|
|
|
|
string(TOUPPER "${CMAKE_BUILD_TYPE}" _build_type_l)
|
2021-10-06 14:43:55 +00:00
|
|
|
set(_plugin_dir "${MAPNIK_PLUGINS_DIR_${_build_type_l}}")
|
2021-09-23 08:33:32 +00:00
|
|
|
# only release has more then one configuration
|
2022-08-11 20:54:50 +00:00
|
|
|
if(NOT _plugin_dir)
|
2021-09-23 08:33:32 +00:00
|
|
|
set(_all_rel_cfgs RELEASE RELWITHDEBINFO MINSIZEREL)
|
2021-10-06 14:43:55 +00:00
|
|
|
list(FIND _all_rel_cfgs ${_build_type_l} _is_rel_cfg)
|
2021-09-23 08:33:32 +00:00
|
|
|
# check if the current configuration is a known release configuration
|
|
|
|
if(${_is_rel_cfg} GREATER_EQUAL 0)
|
|
|
|
foreach(_rel_cfg IN LISTS _all_rel_cfgs)
|
|
|
|
set(_plugin_dir "${MAPNIK_PLUGINS_DIR_${_rel_cfg}}")
|
2022-08-11 20:54:50 +00:00
|
|
|
if(_plugin_dir)
|
2021-09-23 08:33:32 +00:00
|
|
|
break()
|
|
|
|
endif()
|
|
|
|
endforeach()
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
if(NOT _plugin_dir)
|
|
|
|
message(WARNING "Could not find a plugin install dir for configuration ${_build_type_l}")
|
|
|
|
endif()
|
|
|
|
set(${PLUGIN_DIR} ${_plugin_dir} PARENT_SCOPE)
|
2022-08-11 20:54:50 +00:00
|
|
|
endfunction()
|