# Copyright (C) 2020-2021 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

# This will define the following variables:
#
#   HEXL_FOUND          - True if the system has the Intel HEXL library
#   HEXL_VERSION        - The full major.minor.patch version number
#   HEXL_VERSION_MAJOR  - The major version number
#   HEXL_VERSION_MINOR  - The minor version number
#   HEXL_VERSION_PATCH  - The patch version number

@PACKAGE_INIT@

include(CMakeFindDependencyMacro)
find_package(CpuFeatures CONFIG)
if(NOT CpuFeatures_FOUND)
    message(WARNING "Could not find pre-installed CpuFeatures; using CpuFeatures packaged with HEXL")
endif()

include(${CMAKE_CURRENT_LIST_DIR}/HEXLTargets.cmake)

# Defines HEXL_FOUND: If Intel HEXL library was found
if(TARGET HEXL::hexl)
    set(HEXL_FOUND TRUE)
    message(STATUS "Intel HEXL found")
else()
    message(STATUS "Intel HEXL not found")
endif()

set(HEXL_VERSION "@HEXL_VERSION@")
set(HEXL_VERSION_MAJOR "@HEXL_VERSION_MAJOR@")
set(HEXL_VERSION_MINOR "@HEXL_VERSION_MINOR@")
set(HEXL_VERSION_PATCH "@HEXL_VERSION_PATCH@")

set(HEXL_DEBUG "@HEXL_DEBUG@")
