File: mapnikConfig.cmake.in

package info (click to toggle)
mapnik 4.2.1%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 18,656 kB
  • sloc: cpp: 163,870; python: 1,332; sh: 690; xml: 161; makefile: 123; perl: 28; lisp: 13
file content (52 lines) | stat: -rw-r--r-- 1,864 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
@PACKAGE_INIT@

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(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_LIST_DIR}/Modules/")

include(CMakeFindDependencyMacro)

find_dependency(Threads REQUIRED)
@mapnik_find_deps@

include("${CMAKE_CURRENT_LIST_DIR}/mapnikTargets.cmake")

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()
  include("${CMAKE_CURRENT_LIST_DIR}/mapnikUtilityTargets_${_comp}.cmake")
endforeach()


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)
    set(_plugin_dir "${MAPNIK_PLUGINS_DIR_${_build_type_l}}")
    # only release has more then one configuration
    if(NOT _plugin_dir)
        set(_all_rel_cfgs RELEASE RELWITHDEBINFO MINSIZEREL)
        list(FIND _all_rel_cfgs ${_build_type_l} _is_rel_cfg)
        # 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}}")
                if(_plugin_dir)
                    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)
endfunction()