# Copyright © Advanced Micro Devices, Inc., or its affiliates. # SPDX-License-Identifier: MIT @PACKAGE_INIT@ include(CMakeFindDependencyMacro) find_dependency(hipdnn_data_sdk @HIPDNN_FRONTEND_DATA_SDK_MIN_VERSION@ CONFIG REQUIRED) find_dependency(hipdnn_backend @HIPDNN_FRONTEND_BACKEND_MIN_VERSION@ CONFIG REQUIRED) set(HIPDNN_ENABLE_SDPA @HIPDNN_ENABLE_SDPA@) # Frontend headers include directly when JSON support is enabled. # This reflects how hipDNN was built; not consumer-overridable, since the imported # target's compile definitions are already baked in. set(HIPDNN_FRONTEND_SKIP_JSON_LIB @HIPDNN_FRONTEND_SKIP_JSON_LIB@) if(NOT HIPDNN_FRONTEND_SKIP_JSON_LIB) find_dependency(nlohmann_json REQUIRED) endif() include("${CMAKE_CURRENT_LIST_DIR}/hipdnn_frontendTargets.cmake") # The nlohmann include dirs are attached to the in-tree targets via BUILD_INTERFACE # only, so they don't survive export. Re-attach them here for every installed target # whose headers pull in -- both the direct-link and runtime-load # frontends. if(NOT HIPDNN_FRONTEND_SKIP_JSON_LIB AND TARGET nlohmann_json::nlohmann_json) get_target_property(_hipdnn_nlohmann_includes nlohmann_json::nlohmann_json INTERFACE_INCLUDE_DIRECTORIES) if(_hipdnn_nlohmann_includes) foreach(_hipdnn_fe_target hipdnn_frontend hipdnn_frontend_dynamic) get_property(_hipdnn_existing_includes TARGET ${_hipdnn_fe_target} PROPERTY INTERFACE_INCLUDE_DIRECTORIES) list(APPEND _hipdnn_existing_includes ${_hipdnn_nlohmann_includes}) set_property(TARGET ${_hipdnn_fe_target} PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${_hipdnn_existing_includes}) endforeach() unset(_hipdnn_fe_target) endif() endif() check_required_components(hipdnn_frontend)