summaryrefslogtreecommitdiff
path: root/archived/ptlibzippy/ptlibzippyConfig.cmake.in
blob: 3bb9acc344aee3d5558e6b034504bb1be52438b0 (plain)
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
@PACKAGE_INIT@

set(_PTLIBZIPPY_supported_components "shared" "static")

if(PTlibzippy_FIND_COMPONENTS)
    foreach(_comp ${PTlibzippy_FIND_COMPONENTS})
        if(NOT _comp IN_LIST _PTLIBZIPPY_supported_components)
            set(PTlibzippy_FOUND False)
            set(PTlibzippy_NOT_FOUND_MESSAGE "Unsupported component: ${_comp}")
        endif(NOT _comp IN_LIST _PTLIBZIPPY_supported_components)

        include("${CMAKE_CURRENT_LIST_DIR}/PTlibzippy-${_comp}.cmake")
    endforeach(_comp ${PTlibzippy_FIND_COMPONENTS})
else(PTlibzippy_FIND_COMPONENTS)
    foreach(_component_config IN LISTS _PTLIBZIPPY_supported_components)
        set(_component_file "${CMAKE_CURRENT_LIST_DIR}/PTlibzippy-${_component_config}.cmake")
        if(NOT EXISTS "${_component_file}")
            set(PTlibzippy_FOUND False)
            set(PTlibzippy_NOT_FOUND_MESSAGE
                "PTlibzippy component '${_component_config}' is not installed. "
                "Request COMPONENTS explicitly when only a subset is available.")
            return()
        endif()

        include("${_component_file}")
    endforeach(_component_config IN LISTS _PTLIBZIPPY_supported_components)
endif(PTlibzippy_FIND_COMPONENTS)