Skip to content
Tcl Source Code Artifact [da1a5a5406]
Login

Artifact [da1a5a5406]

Artifact da1a5a5406a6299a043067417e06a769a8a72f06e537a7a08799fa9ea875de6d:


set(_puff_supported_components "shared" "static")

if(puff_FIND_COMPONENTS)
    foreach(_comp ${puff_FIND_COMPONENTS})
        if(NOT _comp IN_LIST _puff_supported_components)
            set(puff_FOUND False)
            set(puff_NOT_FOUND_MESSAGE "Unsupported component: ${_comp}")
        endif(NOT _comp IN_LIST _puff_supported_components)

        include("${CMAKE_CURRENT_LIST_DIR}/puff-${_comp}.cmake"
            OPTIONAL
            RESULT_VARIABLE _comp_loaded)

        if(NOT _comp_loaded)
            set(puff_FOUND False)
            set(puff_NOT_FOUND_MESSAGE "Component ${_comp} not found.")
        else(NOT _comp_loaded)
            set(puff_${_comp}_FOUND TRUE)
        endif(NOT _comp_loaded)
    endforeach(_comp ${puff_FIND_COMPONENTS})
else(puff_FIND_COMPONENTS)
    foreach(_component_config IN LISTS _puff_supported_components)
        include("${CMAKE_CURRENT_LIST_DIR}/puff-${_component_config}.cmake"
            OPTIONAL)
    endforeach(_component_config IN LISTS _puff_supported_components)

    if(NOT TARGET PUFF::PUFF)
        set(puff_FOUND False)
        set(puff_NOT_FOUND_MESSAGE "Target ZLIB::ZLIB not created\n")
        string(APPEND puff_NOT_FOUND_MESSAGE "build puff with support for shared libs or\n")
        string(APPEND puff_NOT_FOUND_MESSAGE "specify COMPONENTS static in your find_package call")
    endif(NOT TARGET PUFF::PUFF)

    if(NOT TARGET PUFF::PUFFSTATIC)
        set(puff_FOUND False)
        set(puff_NOT_FOUND_MESSAGE "Target ZLIB::ZLIBSTATIC not created\n")
        string(APPEND puff_NOT_FOUND_MESSAGE "build puff with support for static libs or\n")
        string(APPEND puff_NOT_FOUND_MESSAGE "specify COMPONENTS shared in your find_package call")
    endif(NOT TARGET PUFF::PUFFSTATIC)
endif(puff_FIND_COMPONENTS)