Files
ortools-clone/cmake/ortoolsConfig.cmake.in
Corentin Le Molgat 761982a17f cmake: Add PDLP support
2022-02-17 15:02:23 +01:00

61 lines
1.5 KiB
CMake

## ortools CMake configuration file
set(@PACKAGE_PREFIX@_VERSION @PROJECT_VERSION@)
@PACKAGE_INIT@
include(CMakeFindDependencyMacro)
# Kitware CMake provide a FindZLIB.cmake module
if(NOT ZLIB_FOUND AND NOT TARGET ZLIB::ZLIB)
find_dependency(ZLIB REQUIRED)
endif()
if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.9.6")
set(CONFIG_FLAG CONFIG)
endif()
if(NOT absl_FOUND)
find_dependency(absl REQUIRED ${CONFIG_FLAG})
endif()
if(NOT Protobuf_FOUND AND NOT PROTOBUF_FOUND AND NOT TARGET protobuf::libprotobuf)
find_dependency(Protobuf REQUIRED ${CONFIG_FLAG})
endif()
if(@BUILD_LP_PARSER@)
if(NOT re2_FOUND AND NOT TARGET re2::re2)
find_dependency(re2 REQUIRED ${CONFIG_FLAG})
endif()
endif()
if(@USE_COINOR@)
# COIN-OR packages don't provide CMake config files
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/modules")
if(NOT Clp_FOUND AND NOT TARGET Coin::ClpSolver)
find_dependency(Clp REQUIRED)
endif()
if(NOT Cbc_FOUND AND NOT TARGET Coin::CbcSolver)
find_dependency(Cbc REQUIRED)
endif()
endif()
if(@USE_GLPK@)
if(NOT GLPK_FOUND AND NOT TARGET GLPK::GLPK)
find_dependency(GLPK REQUIRED ${CONFIG_FLAG})
endif()
endif()
if(@USE_PDLP@)
if(NOT Eigen3_FOUND AND NOT TARGET Eigen3::Eigen)
find_dependency(Eigen3 REQUIRED ${CONFIG_FLAG})
endif()
endif()
if(@USE_SCIP@)
if(NOT scip_FOUND AND NOT TARGET libscip)
find_dependency(scip REQUIRED ${CONFIG_FLAG})
endif()
endif()
include("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@Targets.cmake")