41 lines
1.8 KiB
CMake
41 lines
1.8 KiB
CMake
@PACKAGE_INIT@
|
|
include(CMakeFindDependencyMacro)
|
|
include("${CMAKE_CURRENT_LIST_DIR}/AdminiveCoreTargets.cmake")
|
|
if(NOT TARGET Adminive::Adminive)
|
|
add_library(Adminive::Adminive INTERFACE IMPORTED)
|
|
set_property(TARGET Adminive::Adminive PROPERTY INTERFACE_LINK_LIBRARIES Adminive::Core)
|
|
endif()
|
|
if(NOT TARGET Adminive::Http)
|
|
add_library(Adminive::Http INTERFACE IMPORTED)
|
|
set_property(TARGET Adminive::Http PROPERTY INTERFACE_LINK_LIBRARIES Adminive::Core)
|
|
endif()
|
|
set(_adminive_service_loaded FALSE)
|
|
foreach(component IN LISTS Adminive_FIND_COMPONENTS)
|
|
if(component STREQUAL "Core" OR component STREQUAL "Http")
|
|
set(Adminive_${component}_FOUND TRUE)
|
|
elseif(component STREQUAL "Service" OR component STREQUAL "Nlohmann" OR component STREQUAL "MagicEnum" OR component STREQUAL "BoostPfr" OR component STREQUAL "Httplib" OR component STREQUAL "Default")
|
|
if(component STREQUAL "BoostPfr")
|
|
find_dependency(Boost CONFIG)
|
|
endif()
|
|
if(NOT _adminive_service_loaded)
|
|
include("${CMAKE_CURRENT_LIST_DIR}/AdminiveServiceTargets.cmake")
|
|
set(_adminive_service_loaded TRUE)
|
|
endif()
|
|
set(Adminive_${component}_FOUND TRUE)
|
|
elseif(component STREQUAL "Drogon")
|
|
if(NOT _adminive_service_loaded)
|
|
include("${CMAKE_CURRENT_LIST_DIR}/AdminiveServiceTargets.cmake")
|
|
set(_adminive_service_loaded TRUE)
|
|
endif()
|
|
find_dependency(Drogon CONFIG)
|
|
if(TARGET drogon AND NOT TARGET Drogon::Drogon)
|
|
add_library(Drogon::Drogon ALIAS drogon)
|
|
endif()
|
|
include("${CMAKE_CURRENT_LIST_DIR}/AdminiveDrogonTargets.cmake")
|
|
set(Adminive_Drogon_FOUND TRUE)
|
|
else()
|
|
set(Adminive_${component}_FOUND FALSE)
|
|
endif()
|
|
endforeach()
|
|
check_required_components(Adminive)
|