ortoolsConfig.cmake 1.9 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
## ortools CMake configuration file

set(ORTOOLS_VERSION 7.7.7810)


####### 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 ortoolsConfig.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()

####################################################################################

include(CMakeFindDependencyMacro)
# Kitware CMake provide a FindZLIB.cmake module
if(NOT ZLIB_FOUND)
  find_dependency(ZLIB REQUIRED)
endif()

if(${CMAKE_VERSION} VERSION_LESS "3.9.6")
  if(NOT absl_FOUND)
    find_dependency(absl REQUIRED)
  endif()
  if(NOT gflags_FOUND)
    set(GFLAGS_USE_TARGET_NAMESPACE TRUE)
    find_dependency(gflags REQUIRED)
  endif()
  if(NOT glog_FOUND)
    find_dependency(glog REQUIRED)
  endif()
  if(NOT Protobuf_FOUND AND NOT PROTOBUF_FOUND)
    find_dependency(Protobuf REQUIRED)
  endif()
  if(NOT Clp_FOUND)
    find_dependency(Clp REQUIRED)
  endif()
  if(NOT Cbc_FOUND)
    find_dependency(Cbc REQUIRED)
  endif()
else()
  if(NOT absl_FOUND)
    find_dependency(absl REQUIRED CONFIG)
  endif()
  if(NOT gflags_FOUND)
    set(GFLAGS_USE_TARGET_NAMESPACE TRUE)
    find_dependency(gflags REQUIRED CONFIG)
  endif()
  if(NOT glog_FOUND)
    find_dependency(glog REQUIRED CONFIG)
  endif()
  if(NOT Protobuf_FOUND AND NOT PROTOBUF_FOUND)
    find_dependency(Protobuf REQUIRED CONFIG)
  endif()
  if(NOT Clp_FOUND)
    find_dependency(Clp REQUIRED CONFIG)
  endif()
  if(NOT Cbc_FOUND)
    find_dependency(Cbc REQUIRED CONFIG)
  endif()
endif()

include("${CMAKE_CURRENT_LIST_DIR}/ortoolsTargets.cmake")