Skip to content

Commit

Permalink
cmake: Add dummy find module (Fix google#1412)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mizux committed Feb 7, 2020
1 parent c347bcc commit 053d074
Show file tree
Hide file tree
Showing 8 changed files with 190 additions and 8 deletions.
30 changes: 30 additions & 0 deletions cmake/FindCbc.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#[=======================================================================[.rst:
FindCbc
--------
This module determines the Cbc library of the system.
IMPORTED Targets
^^^^^^^^^^^^^^^^
This module defines :prop_tgt:`IMPORTED` target ``Coin::Cbc`` and ``Coin::OsiCbc``, if
Cbc has been found.
Result Variables
^^^^^^^^^^^^^^^^
This module defines the following variables:
::
Cbc_FOUND - True if Cbc found.
#]=======================================================================]
find_package(PkgConfig REQUIRED)

pkg_check_modules(CBC REQUIRED cbc IMPORTED_TARGET GLOBAL)
add_library(Coin::Cbc ALIAS PkgConfig::CBC)
add_library(Coin::CbcSolver ALIAS PkgConfig::CBC)

pkg_check_modules(OSI_CBC REQUIRED osi-cbc IMPORTED_TARGET GLOBAL)
add_library(Coin::OsiCbc ALIAS PkgConfig::OSI_CBC)
26 changes: 26 additions & 0 deletions cmake/FindCgl.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#[=======================================================================[.rst:
FindCgl
--------
This module determines the Cgl library of the system.
IMPORTED Targets
^^^^^^^^^^^^^^^^
This module defines :prop_tgt:`IMPORTED` target ``Coin::Cgl``, if
Cgl has been found.
Result Variables
^^^^^^^^^^^^^^^^
This module defines the following variables:
::
Cgl_FOUND - True if Cgl found.
#]=======================================================================]
find_package(PkgConfig REQUIRED)

pkg_check_modules(CGL REQUIRED cgl IMPORTED_TARGET GLOBAL)
add_library(Coin::Cgl ALIAS PkgConfig::CGL)
30 changes: 30 additions & 0 deletions cmake/FindClp.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#[=======================================================================[.rst:
FindClp
--------
This module determines the Clp library of the system.
IMPORTED Targets
^^^^^^^^^^^^^^^^
This module defines :prop_tgt:`IMPORTED` target ``Coin::Clp`` and ``Coin::OsiClp``, if
Clp has been found.
Result Variables
^^^^^^^^^^^^^^^^
This module defines the following variables:
::
Clp_FOUND - True if Clp found.
#]=======================================================================]
find_package(PkgConfig REQUIRED)

pkg_check_modules(CLP REQUIRED clp IMPORTED_TARGET GLOBAL)
add_library(Coin::Clp ALIAS PkgConfig::CLP)
add_library(Coin::ClpSolver ALIAS PkgConfig::CLP)

pkg_check_modules(OSI_CLP REQUIRED osi-clp IMPORTED_TARGET GLOBAL)
add_library(Coin::OsiClp ALIAS PkgConfig::OSI_CLP)
26 changes: 26 additions & 0 deletions cmake/FindCoinUtils.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#[=======================================================================[.rst:
FindCoinUtils
--------
This module determines the CoinUtils library of the system.
IMPORTED Targets
^^^^^^^^^^^^^^^^
This module defines :prop_tgt:`IMPORTED` target ``Coin::CoinUtils``, if
CoinUtils has been found.
Result Variables
^^^^^^^^^^^^^^^^
This module defines the following variables:
::
CoinUtils_FOUND - True if CoinUtils found.
#]=======================================================================]
find_package(PkgConfig REQUIRED)

pkg_check_modules(COINUTILS REQUIRED coinutils IMPORTED_TARGET GLOBAL)
add_library(Coin::CoinUtils ALIAS PkgConfig::COINUTILS)
26 changes: 26 additions & 0 deletions cmake/FindOsi.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#[=======================================================================[.rst:
FindOsi
--------
This module determines the Osi library of the system.
IMPORTED Targets
^^^^^^^^^^^^^^^^
This module defines :prop_tgt:`IMPORTED` target ``Coin::Osi``, if
Osi has been found.
Result Variables
^^^^^^^^^^^^^^^^
This module defines the following variables:
::
Osi_FOUND - True if Osi found.
#]=======================================================================]
find_package(PkgConfig REQUIRED)

pkg_check_modules(OSI REQUIRED osi IMPORTED_TARGET GLOBAL)
add_library(Coin::Osi ALIAS PkgConfig::OSI)
26 changes: 26 additions & 0 deletions cmake/FindProtobuf.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#[=======================================================================[.rst:
FindProtobuf
--------
This module determines the Protobuf library of the system.
IMPORTED Targets
^^^^^^^^^^^^^^^^
This module defines :prop_tgt:`IMPORTED` target ``Protobuf::Protobuf``, if
Protobuf has been found.
Result Variables
^^^^^^^^^^^^^^^^
This module defines the following variables:
::
Protobuf_FOUND - True if Protobuf found.
#]=======================================================================]
find_package(PkgConfig REQUIRED)

pkg_check_modules(PROTOBUF REQUIRED protobuf IMPORTED_TARGET GLOBAL)
add_library(protobuf::libprotobuf ALIAS PkgConfig::PROTOBUF)
8 changes: 0 additions & 8 deletions cmake/FindSCIP.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,6 @@ else()
message(FATAL_ERROR "FindSCIP only works if either C or CXX language is enabled")
endif()

if(APPLE)
message(FATAL_ERROR "SCIP not yet supported on macOS")
elseif(UNIX)
message(FATAL_ERROR "SCIP not yet supported on Linux")
elseif(MSVC)
message(FATAL_ERROR "SCIP not yet supported on Windows")
endif()

if(NOT SCIP_ROOT)
set(SCIP_ROOT $ENV{SCIP_ROOT})
endif()
Expand Down
26 changes: 26 additions & 0 deletions cmake/Findglog.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#[=======================================================================[.rst:
Findglog
--------
This module determines the glog library of the system.
IMPORTED Targets
^^^^^^^^^^^^^^^^
This module defines :prop_tgt:`IMPORTED` target ``glog::glog``, if
glog has been found.
Result Variables
^^^^^^^^^^^^^^^^
This module defines the following variables:
::
glog_FOUND - True if glog found.
#]=======================================================================]
find_package(PkgConfig REQUIRED)

pkg_check_modules(GLOG REQUIRED libglog IMPORTED_TARGET GLOBAL)
add_library(glog::glog ALIAS PkgConfig::GLOG)

0 comments on commit 053d074

Please sign in to comment.