cmake_minimum_required(VERSION 3.3)
set(BPF_COMPONENTS "Module;Program;Plugin;Conan")

foreach (comp ${BPF_FIND_COMPONENTS})
    if (NOT ${comp} IN_LIST BPF_COMPONENTS)
        message(FATAL_ERROR "Unkown CMake Framework Component: ${comp}")
    endif (NOT ${comp} IN_LIST BPF_COMPONENTS)
    if (comp STREQUAL "Conan")
        set(comp "conan")
    endif (comp STREQUAL "Conan")
    if (DEFINED ENV{BPF_HOME})
        include("$ENV{BPF_HOME}/CMakes/${comp}.cmake")
    else (DEFINED ENV{BPF_HOME})
        include("${CMAKE_CURRENT_LIST_DIR}/CMakes/${comp}.cmake")
    endif (DEFINED ENV{BPF_HOME})
endforeach (comp ${BPF_FIND_COMPONENTS})
