Files
ortools-clone/cmake/ortoolsConfig.cmake.in
Corentin Le Molgat a49b9143a4 Rework CMake dependencies management (Fix #1116)
- By default don't build dependencies simply call find_package()
- By default only build C++ library
- IF building Python, Java or .Net wrapper then force build dependencies
  - Build dependencies as STATIC
  - Build and Install (in CMAKE_BINARY_DIR) dependencies at configure time
2019-04-11 13:47:05 +02:00

55 lines
1.3 KiB
CMake

## ortools CMake configuration file
set(@PACKAGE_PREFIX@_VERSION @PROJECT_VERSION@)
@PACKAGE_INIT@
include(CMakeFindDependencyMacro)
if(${CMAKE_VERSION} VERSION_LESS "3.9.6")
if(NOT ZLIB_FOUND)
find_dependency(ZLIB REQUIRED)
endif()
if(NOT absl_FOUND)
find_dependency(absl REQUIRED)
endif()
if(NOT gflags_FOUND)
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 ZLIB_FOUND)
find_dependency(ZLIB REQUIRED CONFIG)
endif()
if(NOT absl_FOUND)
find_dependency(absl REQUIRED CONFIG)
endif()
if(NOT gflags_FOUND)
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}/@PROJECT_NAME@Targets.cmake")