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.

94 lines
3.4 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. "/Library/gurobi651/mac64/include"
  22. "/Library/gurobi652/mac64/include"
  23. "/Library/gurobi702/mac64/include"
  24. "/Library/gurobi801/mac64/include"
  25. "/Library/gurobi810/mac64/include"
  26. "${GUROBI_ROOT}/include"
  27. )
  28. find_library( GUROBI_LIBRARY
  29. NAMES gurobi
  30. gurobi45
  31. gurobi46
  32. gurobi50
  33. gurobi51
  34. gurobi52
  35. gurobi55
  36. gurobi56
  37. gurobi60
  38. gurobi65
  39. gurobi70
  40. gurobi75
  41. gurobi80
  42. gurobi81
  43. PATHS "$ENV{GUROBI_HOME}/lib"
  44. "/Library/gurobi502/mac64/lib"
  45. "/Library/gurobi602/mac64/lib"
  46. "/Library/gurobi604/mac64/lib"
  47. "/Library/gurobi605/mac64/lib"
  48. "/Library/gurobi650/mac64/lib"
  49. "/Library/gurobi651/mac64/lib"
  50. "/Library/gurobi652/mac64/lib"
  51. "/Library/gurobi702/mac64/lib"
  52. "/Library/gurobi801/mac64/lib"
  53. "/Library/gurobi810/mac64/lib"
  54. "/Library/gurobi811/mac64/lib"
  55. "${GUROBI_ROOT}/lib"
  56. )
  57. find_library( GUROBI_CXX_LIBRARY
  58. NAMES gurobi_c++
  59. PATHS "$ENV{GUROBI_HOME}/lib"
  60. "/Library/gurobi502/mac64/lib"
  61. "/Library/gurobi602/mac64/lib"
  62. "/Library/gurobi604/mac64/lib"
  63. "/Library/gurobi605/mac64/lib"
  64. "/Library/gurobi650/mac64/lib"
  65. "/Library/gurobi651/mac64/lib"
  66. "/Library/gurobi652/mac64/lib"
  67. "/Library/gurobi702/mac64/lib"
  68. "/Library/gurobi801/mac64/lib"
  69. "/Library/gurobi810/mac64/lib"
  70. "/Library/gurobi811/mac64/lib"
  71. "${GUROBI_ROOT}/lib"
  72. )
  73. set(GUROBI_INCLUDE_DIRS "${GUROBI_INCLUDE_DIR}" )
  74. set(GUROBI_LIBRARIES "${GUROBI_LIBRARY};${GUROBI_CXX_LIBRARY}" )
  75. # use c++ headers as default
  76. # set(GUROBI_COMPILER_FLAGS "-DIL_STD" CACHE STRING "Gurobi Compiler Flags")
  77. include(FindPackageHandleStandardArgs)
  78. # handle the QUIETLY and REQUIRED arguments and set LIBCPLEX_FOUND to TRUE
  79. # if all listed variables are TRUE
  80. find_package_handle_standard_args(GUROBI DEFAULT_MSG
  81. GUROBI_LIBRARY GUROBI_CXX_LIBRARY GUROBI_INCLUDE_DIR)
  82. mark_as_advanced(GUROBI_INCLUDE_DIR GUROBI_LIBRARY GUROBI_CXX_LIBRARY)
  83. endif(GUROBI_INCLUDE_DIR)