# Imported targets
# ^^^^^^^^^^^^^^^^
# This module defines the following `IMPORTED` targets:
#
# ``apollo::cyber``
# ``apollo::cyber_proto``
#
# Example usage
# ^^^^^^^^^^^^^
# ::
#     find_package(apollo REQUIRED)
#     add_executable(foo foo.cc)
#     target_link_libraries(foo apollo::cyber apollo::cyber_proto)

####### Expanded from @PACKAGE_INIT@ by configure_package_config_file() #######
####### Any changes to this file will be overwritten by the next CMake run ####
####### The input file was apolloConfig.cmake.in                            ########

get_filename_component(PACKAGE_PREFIX_DIR "${CMAKE_CURRENT_LIST_DIR}/../../../" ABSOLUTE)

macro(set_and_check _var _file)
  set(${_var} "${_file}")
  if(NOT EXISTS "${_file}")
    message(FATAL_ERROR "File or directory ${_file} referenced by variable ${_var} does not exist !")
  endif()
endmacro()

macro(check_required_components _NAME)
  foreach(comp ${${_NAME}_FIND_COMPONENTS})
    if(NOT ${_NAME}_${comp}_FOUND)
      if(${_NAME}_FIND_REQUIRED_${comp})
        set(${_NAME}_FOUND FALSE)
      endif()
    endif()
  endforeach()
endmacro()

####################################################################################
include(CMakeFindDependencyMacro)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake")

find_dependency(FastRTPS REQUIRED)
find_dependency(UUID REQUIRED)
find_dependency(gflags REQUIRED)
find_dependency(GLOG REQUIRED)
find_package(Boost REQUIRED COMPONENTS system thread)
find_dependency(PROTOBUF REQUIRED)
find_dependency(osqp REQUIRED)
find_dependency(qpOASES REQUIRED)
find_dependency(curlpp REQUIRED)
find_dependency(TINYXML2 REQUIRED)
find_dependency(PROJ4 REQUIRED)
find_dependency(IPOPT REQUIRED)
find_dependency(ADOLC REQUIRED)
find_dependency(Eigen3 REQUIRED)
find_dependency(OpenMP)

include(${CMAKE_CURRENT_LIST_DIR}/apollo-export.cmake)
