You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

77 lines
2.7 KiB

  1. #### Taken from http://www.openflipper.org/svnrepo/CoMISo/trunk/CoMISo/cmake/FindGUROBI.cmake
  2. # - Try to find GUROBI
  3. # Once done this will define
  4. # GUROBI_FOUND - System has Gurobi
  5. # GUROBI_INCLUDE_DIRS - The Gurobi include directories
  6. # GUROBI_LIBRARIES - The libraries needed to use Gurobi
  7. if (GUROBI_INCLUDE_DIR)
  8. # in cache already
  9. set(GUROBI_FOUND TRUE)
  10. set(GUROBI_INCLUDE_DIRS "${GUROBI_INCLUDE_DIR}" )
  11. set(GUROBI_LIBRARIES "${GUROBI_LIBRARY};${GUROBI_CXX_LIBRARY}" )
  12. else (GUROBI_INCLUDE_DIR)
  13. find_path(GUROBI_INCLUDE_DIR
  14. NAMES gurobi_c++.h
  15. PATHS "$ENV{GUROBI_HOME}/include"
  16. "/Library/gurobi502/mac64/include"
  17. "/Library/gurobi602/mac64/include"
  18. "/Library/gurobi604/mac64/include"
  19. "/Library/gurobi605/mac64/include"
  20. "/Library/gurobi650/mac64/include"
  21. "C:\\libs\\gurobi502\\include"
  22. "C:\\gurobi600\\win64\\include"
  23. "${GUROBI_ROOT}/include"
  24. )
  25. find_library( GUROBI_LIBRARY
  26. NAMES gurobi
  27. gurobi45
  28. gurobi46
  29. gurobi50
  30. gurobi51
  31. gurobi52
  32. gurobi55
  33. gurobi56
  34. gurobi60
  35. gurobi65
  36. PATHS "$ENV{GUROBI_HOME}/lib"
  37. "/Library/gurobi502/mac64/lib"
  38. "/Library/gurobi602/mac64/lib"
  39. "/Library/gurobi604/mac64/lib"
  40. "/Library/gurobi605/mac64/lib"
  41. "C:\\libs\\gurobi502\\lib"
  42. "C:\\gurobi600\\win64\\lib"
  43. "${GUROBI_ROOT}/lib"
  44. )
  45. find_library( GUROBI_CXX_LIBRARY
  46. NAMES gurobi_c++
  47. PATHS "$ENV{GUROBI_HOME}/lib"
  48. "/Library/gurobi502/mac64/lib"
  49. "/Library/gurobi602/mac64/lib"
  50. "/Library/gurobi604/mac64/lib"
  51. "/Library/gurobi605/mac64/lib"
  52. "/Library/gurobi650/mac64/lib"
  53. "C:\\libs\\gurobi502\\lib"
  54. "C:\\gurobi600\\win64\\lib"
  55. "${GUROBI_ROOT}/lib"
  56. )
  57. set(GUROBI_INCLUDE_DIRS "${GUROBI_INCLUDE_DIR}" )
  58. set(GUROBI_LIBRARIES "${GUROBI_LIBRARY};${GUROBI_CXX_LIBRARY}" )
  59. # use c++ headers as default
  60. # set(GUROBI_COMPILER_FLAGS "-DIL_STD" CACHE STRING "Gurobi Compiler Flags")
  61. include(FindPackageHandleStandardArgs)
  62. # handle the QUIETLY and REQUIRED arguments and set LIBCPLEX_FOUND to TRUE
  63. # if all listed variables are TRUE
  64. find_package_handle_standard_args(GUROBI DEFAULT_MSG
  65. GUROBI_LIBRARY GUROBI_CXX_LIBRARY GUROBI_INCLUDE_DIR)
  66. mark_as_advanced(GUROBI_INCLUDE_DIR GUROBI_LIBRARY GUROBI_CXX_LIBRARY)
  67. endif(GUROBI_INCLUDE_DIR)