summaryrefslogtreecommitdiff
path: root/lemon/cmake
diff options
context:
space:
mode:
Diffstat (limited to 'lemon/cmake')
-rw-r--r--lemon/cmake/FindCOIN.cmake98
-rw-r--r--lemon/cmake/FindCPLEX.cmake38
-rw-r--r--lemon/cmake/FindGLPK.cmake61
-rw-r--r--lemon/cmake/FindGhostscript.cmake10
-rw-r--r--lemon/cmake/LEMONConfig.cmake.in13
-rw-r--r--lemon/cmake/nsis/lemon.icobin0 -> 22486 bytes
-rw-r--r--lemon/cmake/nsis/uninstall.icobin0 -> 15086 bytes
-rw-r--r--lemon/cmake/version.cmake1
-rw-r--r--lemon/cmake/version.cmake.in1
9 files changed, 222 insertions, 0 deletions
diff --git a/lemon/cmake/FindCOIN.cmake b/lemon/cmake/FindCOIN.cmake
new file mode 100644
index 0000000..74d37c0
--- /dev/null
+++ b/lemon/cmake/FindCOIN.cmake
@@ -0,0 +1,98 @@
+SET(COIN_ROOT_DIR "" CACHE PATH "COIN root directory")
+
+FIND_PATH(COIN_INCLUDE_DIR coin/CoinUtilsConfig.h
+ HINTS ${COIN_ROOT_DIR}/include
+)
+FIND_LIBRARY(COIN_CBC_LIBRARY
+ NAMES Cbc libCbc
+ HINTS ${COIN_ROOT_DIR}/lib/coin
+ HINTS ${COIN_ROOT_DIR}/lib
+)
+FIND_LIBRARY(COIN_CBC_SOLVER_LIBRARY
+ NAMES CbcSolver libCbcSolver
+ HINTS ${COIN_ROOT_DIR}/lib/coin
+ HINTS ${COIN_ROOT_DIR}/lib
+)
+FIND_LIBRARY(COIN_CGL_LIBRARY
+ NAMES Cgl libCgl
+ HINTS ${COIN_ROOT_DIR}/lib/coin
+ HINTS ${COIN_ROOT_DIR}/lib
+)
+FIND_LIBRARY(COIN_CLP_LIBRARY
+ NAMES Clp libClp
+ HINTS ${COIN_ROOT_DIR}/lib/coin
+ HINTS ${COIN_ROOT_DIR}/lib
+)
+FIND_LIBRARY(COIN_COIN_UTILS_LIBRARY
+ NAMES CoinUtils libCoinUtils
+ HINTS ${COIN_ROOT_DIR}/lib/coin
+ HINTS ${COIN_ROOT_DIR}/lib
+)
+FIND_LIBRARY(COIN_OSI_LIBRARY
+ NAMES Osi libOsi
+ HINTS ${COIN_ROOT_DIR}/lib/coin
+ HINTS ${COIN_ROOT_DIR}/lib
+)
+FIND_LIBRARY(COIN_OSI_CBC_LIBRARY
+ NAMES OsiCbc libOsiCbc
+ HINTS ${COIN_ROOT_DIR}/lib/coin
+ HINTS ${COIN_ROOT_DIR}/lib
+)
+FIND_LIBRARY(COIN_OSI_CLP_LIBRARY
+ NAMES OsiClp libOsiClp
+ HINTS ${COIN_ROOT_DIR}/lib/coin
+ HINTS ${COIN_ROOT_DIR}/lib
+)
+FIND_LIBRARY(COIN_OSI_VOL_LIBRARY
+ NAMES OsiVol libOsiVol
+ HINTS ${COIN_ROOT_DIR}/lib/coin
+ HINTS ${COIN_ROOT_DIR}/lib
+)
+FIND_LIBRARY(COIN_VOL_LIBRARY
+ NAMES Vol libVol
+ HINTS ${COIN_ROOT_DIR}/lib/coin
+ HINTS ${COIN_ROOT_DIR}/lib
+)
+
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(COIN DEFAULT_MSG
+ COIN_INCLUDE_DIR
+ COIN_CBC_LIBRARY
+ COIN_CBC_SOLVER_LIBRARY
+ COIN_CGL_LIBRARY
+ COIN_CLP_LIBRARY
+ COIN_COIN_UTILS_LIBRARY
+ COIN_OSI_LIBRARY
+ COIN_OSI_CBC_LIBRARY
+ COIN_OSI_CLP_LIBRARY
+ # COIN_OSI_VOL_LIBRARY
+ # COIN_VOL_LIBRARY
+)
+
+IF(COIN_FOUND)
+ SET(COIN_INCLUDE_DIRS ${COIN_INCLUDE_DIR})
+ SET(COIN_LIBRARIES "${COIN_CBC_LIBRARY};${COIN_CBC_SOLVER_LIBRARY};${COIN_CGL_LIBRARY};${COIN_CLP_LIBRARY};${COIN_COIN_UTILS_LIBRARY};${COIN_OSI_LIBRARY};${COIN_OSI_CBC_LIBRARY};${COIN_OSI_CLP_LIBRARY}")
+ SET(COIN_CLP_LIBRARIES "${COIN_CLP_LIBRARY};${COIN_COIN_UTILS_LIBRARY}")
+ SET(COIN_CBC_LIBRARIES ${COIN_LIBRARIES})
+ENDIF(COIN_FOUND)
+
+MARK_AS_ADVANCED(
+ COIN_INCLUDE_DIR
+ COIN_CBC_LIBRARY
+ COIN_CBC_SOLVER_LIBRARY
+ COIN_CGL_LIBRARY
+ COIN_CLP_LIBRARY
+ COIN_COIN_UTILS_LIBRARY
+ COIN_OSI_LIBRARY
+ COIN_OSI_CBC_LIBRARY
+ COIN_OSI_CLP_LIBRARY
+ COIN_OSI_VOL_LIBRARY
+ COIN_VOL_LIBRARY
+)
+
+IF(COIN_FOUND)
+ SET(LEMON_HAVE_LP TRUE)
+ SET(LEMON_HAVE_MIP TRUE)
+ SET(LEMON_HAVE_CLP TRUE)
+ SET(LEMON_HAVE_CBC TRUE)
+ENDIF(COIN_FOUND)
diff --git a/lemon/cmake/FindCPLEX.cmake b/lemon/cmake/FindCPLEX.cmake
new file mode 100644
index 0000000..71dca09
--- /dev/null
+++ b/lemon/cmake/FindCPLEX.cmake
@@ -0,0 +1,38 @@
+SET(CPLEX_ROOT_DIR "" CACHE PATH "CPLEX root directory")
+
+FIND_PATH(CPLEX_INCLUDE_DIR
+ ilcplex/cplex.h
+ PATHS "C:/ILOG/CPLEX91/include"
+ PATHS "/opt/ilog/cplex91/include"
+ HINTS ${CPLEX_ROOT_DIR}/include
+)
+FIND_LIBRARY(CPLEX_LIBRARY
+ cplex91
+ PATHS "C:/ILOG/CPLEX91/lib/msvc7/stat_mda"
+ PATHS "/opt/ilog/cplex91/bin"
+ HINTS ${CPLEX_ROOT_DIR}/bin
+)
+
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(CPLEX DEFAULT_MSG CPLEX_LIBRARY CPLEX_INCLUDE_DIR)
+
+FIND_PATH(CPLEX_BIN_DIR
+ cplex91.dll
+ PATHS "C:/ILOG/CPLEX91/bin/x86_win32"
+)
+
+IF(CPLEX_FOUND)
+ SET(CPLEX_INCLUDE_DIRS ${CPLEX_INCLUDE_DIR})
+ SET(CPLEX_LIBRARIES ${CPLEX_LIBRARY})
+ IF(CMAKE_SYSTEM_NAME STREQUAL "Linux")
+ SET(CPLEX_LIBRARIES "${CPLEX_LIBRARIES};m;pthread")
+ ENDIF(CMAKE_SYSTEM_NAME STREQUAL "Linux")
+ENDIF(CPLEX_FOUND)
+
+MARK_AS_ADVANCED(CPLEX_LIBRARY CPLEX_INCLUDE_DIR CPLEX_BIN_DIR)
+
+IF(CPLEX_FOUND)
+ SET(LEMON_HAVE_LP TRUE)
+ SET(LEMON_HAVE_MIP TRUE)
+ SET(LEMON_HAVE_CPLEX TRUE)
+ENDIF(CPLEX_FOUND)
diff --git a/lemon/cmake/FindGLPK.cmake b/lemon/cmake/FindGLPK.cmake
new file mode 100644
index 0000000..4e576af
--- /dev/null
+++ b/lemon/cmake/FindGLPK.cmake
@@ -0,0 +1,61 @@
+SET(GLPK_ROOT_DIR "" CACHE PATH "GLPK root directory")
+
+SET(GLPK_REGKEY "[HKEY_LOCAL_MACHINE\\SOFTWARE\\GnuWin32\\Glpk;InstallPath]")
+GET_FILENAME_COMPONENT(GLPK_ROOT_PATH ${GLPK_REGKEY} ABSOLUTE)
+
+FIND_PATH(GLPK_INCLUDE_DIR
+ glpk.h
+ PATHS ${GLPK_REGKEY}/include
+ HINTS ${GLPK_ROOT_DIR}/include
+)
+FIND_LIBRARY(GLPK_LIBRARY
+ glpk
+ PATHS ${GLPK_REGKEY}/lib
+ HINTS ${GLPK_ROOT_DIR}/lib
+)
+
+IF(GLPK_INCLUDE_DIR AND GLPK_LIBRARY)
+ FILE(READ ${GLPK_INCLUDE_DIR}/glpk.h GLPK_GLPK_H)
+
+ STRING(REGEX MATCH "define[ ]+GLP_MAJOR_VERSION[ ]+[0-9]+" GLPK_MAJOR_VERSION_LINE "${GLPK_GLPK_H}")
+ STRING(REGEX REPLACE "define[ ]+GLP_MAJOR_VERSION[ ]+([0-9]+)" "\\1" GLPK_VERSION_MAJOR "${GLPK_MAJOR_VERSION_LINE}")
+
+ STRING(REGEX MATCH "define[ ]+GLP_MINOR_VERSION[ ]+[0-9]+" GLPK_MINOR_VERSION_LINE "${GLPK_GLPK_H}")
+ STRING(REGEX REPLACE "define[ ]+GLP_MINOR_VERSION[ ]+([0-9]+)" "\\1" GLPK_VERSION_MINOR "${GLPK_MINOR_VERSION_LINE}")
+
+ SET(GLPK_VERSION_STRING "${GLPK_VERSION_MAJOR}.${GLPK_VERSION_MINOR}")
+
+ IF(GLPK_FIND_VERSION)
+ IF(GLPK_FIND_VERSION_COUNT GREATER 2)
+ MESSAGE(SEND_ERROR "unexpected version string")
+ ENDIF(GLPK_FIND_VERSION_COUNT GREATER 2)
+
+ MATH(EXPR GLPK_REQUESTED_VERSION "${GLPK_FIND_VERSION_MAJOR}*100 + ${GLPK_FIND_VERSION_MINOR}")
+ MATH(EXPR GLPK_FOUND_VERSION "${GLPK_VERSION_MAJOR}*100 + ${GLPK_VERSION_MINOR}")
+
+ IF(GLPK_FOUND_VERSION LESS GLPK_REQUESTED_VERSION)
+ SET(GLPK_PROPER_VERSION_FOUND FALSE)
+ ELSE(GLPK_FOUND_VERSION LESS GLPK_REQUESTED_VERSION)
+ SET(GLPK_PROPER_VERSION_FOUND TRUE)
+ ENDIF(GLPK_FOUND_VERSION LESS GLPK_REQUESTED_VERSION)
+ ELSE(GLPK_FIND_VERSION)
+ SET(GLPK_PROPER_VERSION_FOUND TRUE)
+ ENDIF(GLPK_FIND_VERSION)
+ENDIF(GLPK_INCLUDE_DIR AND GLPK_LIBRARY)
+
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(GLPK DEFAULT_MSG GLPK_LIBRARY GLPK_INCLUDE_DIR GLPK_PROPER_VERSION_FOUND)
+
+IF(GLPK_FOUND)
+ SET(GLPK_INCLUDE_DIRS ${GLPK_INCLUDE_DIR})
+ SET(GLPK_LIBRARIES ${GLPK_LIBRARY})
+ SET(GLPK_BIN_DIR ${GLPK_ROOT_PATH}/bin)
+ENDIF(GLPK_FOUND)
+
+MARK_AS_ADVANCED(GLPK_LIBRARY GLPK_INCLUDE_DIR GLPK_BIN_DIR)
+
+IF(GLPK_FOUND)
+ SET(LEMON_HAVE_LP TRUE)
+ SET(LEMON_HAVE_MIP TRUE)
+ SET(LEMON_HAVE_GLPK TRUE)
+ENDIF(GLPK_FOUND)
diff --git a/lemon/cmake/FindGhostscript.cmake b/lemon/cmake/FindGhostscript.cmake
new file mode 100644
index 0000000..3366a00
--- /dev/null
+++ b/lemon/cmake/FindGhostscript.cmake
@@ -0,0 +1,10 @@
+INCLUDE(FindPackageHandleStandardArgs)
+
+FIND_PROGRAM(GHOSTSCRIPT_EXECUTABLE
+ NAMES gs gswin32c
+ PATHS "$ENV{ProgramFiles}/gs"
+ PATH_SUFFIXES gs8.61/bin gs8.62/bin gs8.63/bin gs8.64/bin gs8.65/bin
+ DOC "Ghostscript: PostScript and PDF language interpreter and previewer."
+)
+
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(Ghostscript DEFAULT_MSG GHOSTSCRIPT_EXECUTABLE)
diff --git a/lemon/cmake/LEMONConfig.cmake.in b/lemon/cmake/LEMONConfig.cmake.in
new file mode 100644
index 0000000..b0d2d8b
--- /dev/null
+++ b/lemon/cmake/LEMONConfig.cmake.in
@@ -0,0 +1,13 @@
+SET(LEMON_INCLUDE_DIR "@CMAKE_INSTALL_PREFIX@/include" CACHE PATH "LEMON include directory")
+SET(LEMON_INCLUDE_DIRS "${LEMON_INCLUDE_DIR}")
+
+IF(UNIX)
+ SET(LEMON_LIB_NAME "libemon.a")
+ELSEIF(WIN32)
+ SET(LEMON_LIB_NAME "lemon.lib")
+ENDIF(UNIX)
+
+SET(LEMON_LIBRARY "@CMAKE_INSTALL_PREFIX@/lib/${LEMON_LIB_NAME}" CACHE FILEPATH "LEMON library")
+SET(LEMON_LIBRARIES "${LEMON_LIBRARY}")
+
+MARK_AS_ADVANCED(LEMON_LIBRARY LEMON_INCLUDE_DIR)
diff --git a/lemon/cmake/nsis/lemon.ico b/lemon/cmake/nsis/lemon.ico
new file mode 100644
index 0000000..bbfd8c1
--- /dev/null
+++ b/lemon/cmake/nsis/lemon.ico
Binary files differ
diff --git a/lemon/cmake/nsis/uninstall.ico b/lemon/cmake/nsis/uninstall.ico
new file mode 100644
index 0000000..7495f7c
--- /dev/null
+++ b/lemon/cmake/nsis/uninstall.ico
Binary files differ
diff --git a/lemon/cmake/version.cmake b/lemon/cmake/version.cmake
new file mode 100644
index 0000000..9c106b6
--- /dev/null
+++ b/lemon/cmake/version.cmake
@@ -0,0 +1 @@
+SET(LEMON_VERSION "1.2.3" CACHE STRING "LEMON version string.")
diff --git a/lemon/cmake/version.cmake.in b/lemon/cmake/version.cmake.in
new file mode 100644
index 0000000..4a2680b
--- /dev/null
+++ b/lemon/cmake/version.cmake.in
@@ -0,0 +1 @@
+SET(LEMON_VERSION "@PACKAGE_VERSION@" CACHE STRING "LEMON version string.")