include(${CMAKE_CURRENT_LIST_DIR}/LogUtils.cmake)
if(otl_VERSION_MAJOR)
    set(OtlFileName otlv${otl_VERSION_MAJOR}.h)
else()
    set(OtlFileName otl.h)
endif()

find_path(otl_INCLUDE_DIR otl/${OtlFileName} PATHS ${otl_INCLUDEDIR})

if(NOT otl_INCLUDE_DIR)
    message(FATAL_ERROR "Unable to find the requested otl library,please set otl_INCLUDEDIR to right path.")
else()
    message(STATUS "Found otl library")
    message(STATUS "  Include path: " ${otl_INCLUDE_DIR})
    add_library(otl INTERFACE IMPORTED)
    set_target_properties(otl PROPERTIES INTERFACE_INCLUDE_DIRECTORIES ${otl_INCLUDE_DIR})
    set(otl_FOUND TRUE)
endif()