this repo has no description
at develop 1.6 kB view raw
1# - Try to find FICO Xpress 2# Once done this will define 3# XPRESS_FOUND - System has FICO Xpress 4# XPRESS_INCLUDE_DIRS - The FICO Xpress include directories 5# XPRESS_LIBRARIES - The libraries needed to use FICO Xpress 6# User can set XPRESS_ROOT to the preferred installation prefix 7 8list(INSERT CMAKE_PREFIX_PATH 0 "${XPRESS_ROOT}" "$ENV{XPRESS_ROOT}") 9 10#TODO: Check default installation locations 11find_path(XPRESS_INCLUDE xprs.h 12 PATHS $ENV{XPRESSDIR} $ENV{XPRESS} $ENV{XPRESS_DIR} 13 HINTS /opt/xpressmp C:/xpressmp 14 PATH_SUFFIXES include) 15 16foreach(XPRESS_LIB xprb xprs) 17 set(XPRESS_LIB_LOC "XPRESS_LIB_LOC-NOTFOUND") 18 find_library(XPRESS_LIB_LOC NAMES ${XPRESS_LIB} lib${XPRESS_LIB} 19 PATHS $ENV{XPRESSDIR} $ENV{XPRESS} $ENV{XPRESS_DIR} 20 HINTS /opt/xpressmp C:/xpressmp 21 PATH_SUFFIXES lib) 22 if("${XPRESS_LIB_LOC}" STREQUAL "XPRESS_LIB_LOC-NOTFOUND") 23# message(STATUS "FICO Xpres: Could not find library `${XPRESS_LIB}`") 24 set(XPRESS_LIBRARY "") 25 break() 26 endif() 27 list(APPEND XPRESS_LIBRARY ${XPRESS_LIB_LOC}) 28endforeach(XPRESS_LIB) 29 30include(FindPackageHandleStandardArgs) 31# handle the QUIETLY and REQUIRED arguments and set XPRESS_FOUND to TRUE 32# if all listed variables are TRUE 33find_package_handle_standard_args(Xpress 34 FOUND_VAR XPRESS_FOUND 35 REQUIRED_VARS XPRESS_INCLUDE XPRESS_LIBRARY 36 FAIL_MESSAGE "Could NOT find Xpress, use XPRESS_ROOT to hint its location" 37) 38 39mark_as_advanced(XPRESS_INCLUDE XPRESS_LIBRARY) 40list(REMOVE_AT CMAKE_PREFIX_PATH 1 0) 41 42set(XPRESS_LIBRARIES ${XPRESS_LIBRARY}) 43set(XPRESS_INCLUDE_DIRS ${XPRESS_INCLUDE})