COIN-OR::LEMON - Graph Library

Ticket #256: 001-glpk-cmake.patch

File 001-glpk-cmake.patch, 1.8 KB (added by Akos Ladanyi, 16 years ago)

ec817dfc2cb7

  • CMakeLists.txt

    # HG changeset patch
    # User Akos Ladanyi <ladanyi@tmit.bme.hu>
    # Date 1240468136 -3600
    # Node ID ec817dfc2cb7833db46c225906d03260901ad83d
    # Parent  85cb3aa71cced72f8915b8abf50f705037a76bb1
    FindGLPK improvements (#256)
    
    diff --git a/CMakeLists.txt b/CMakeLists.txt
    a b  
    2626# C4996: 'function': was declared deprecated
    2727ENDIF(MSVC)
    2828
    29 IF(GLPK_FOUND)
    30   SET(HAVE_LP TRUE)
    31   SET(HAVE_MIP TRUE)
    32   SET(HAVE_GLPK TRUE)
    33 ENDIF(GLPK_FOUND)
    34 
    3529INCLUDE(CheckTypeSize)
    3630CHECK_TYPE_SIZE("long long" LONG_LONG)
    3731
  • cmake/FindGLPK.cmake

    diff --git a/cmake/FindGLPK.cmake b/cmake/FindGLPK.cmake
    a b  
    1313FIND_PACKAGE_HANDLE_STANDARD_ARGS(GLPK DEFAULT_MSG GLPK_LIBRARY GLPK_INCLUDE_DIR)
    1414
    1515IF(GLPK_FOUND)
     16  SET(GLPK_INCLUDE_DIRS ${GLPK_INCLUDE_DIR})
    1617  SET(GLPK_LIBRARIES ${GLPK_LIBRARY})
    1718  SET(GLPK_BIN_DIR ${GLPK_ROOT_PATH}/bin)
    1819ENDIF(GLPK_FOUND)
    1920
    2021MARK_AS_ADVANCED(GLPK_LIBRARY GLPK_INCLUDE_DIR GLPK_BIN_DIR)
     22
     23IF(GLPK_FOUND)
     24  SET(HAVE_LP TRUE)
     25  SET(HAVE_MIP TRUE)
     26  SET(HAVE_GLPK TRUE)
     27ENDIF(GLPK_FOUND)
  • lemon/CMakeLists.txt

    diff --git a/lemon/CMakeLists.txt b/lemon/CMakeLists.txt
    a b  
    2020
    2121IF(HAVE_GLPK)
    2222  SET(LEMON_SOURCES ${LEMON_SOURCES} glpk.cc)
    23   INCLUDE_DIRECTORIES(${GLPK_INCLUDE_DIR})
     23  INCLUDE_DIRECTORIES(${GLPK_INCLUDE_DIRS})
    2424  IF(WIN32)
    2525    INSTALL(FILES ${GLPK_BIN_DIR}/glpk.dll DESTINATION bin)
    2626    INSTALL(FILES ${GLPK_BIN_DIR}/libltdl3.dll DESTINATION bin)
  • test/CMakeLists.txt

    diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
    a b  
    33  ${PROJECT_BINARY_DIR}
    44)
    55
    6 IF(HAVE_GLPK)
    7   INCLUDE_DIRECTORIES(${GLPK_INCLUDE_DIR})
    8 ENDIF(HAVE_GLPK)
    9 
    106LINK_DIRECTORIES(${PROJECT_BINARY_DIR}/lemon)
    117
    128SET(TESTS