COIN-OR::LEMON - Graph Library

Changeset 474:f59df77f5c8d in lemon-main


Ignore:
Timestamp:
01/21/09 19:08:31 (16 years ago)
Author:
Akos Ladanyi <ladanyi@…>
Branch:
default
Phase:
public
Message:

Fix CMAKE build without GLPK

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • demo/CMakeLists.txt

    r473 r474  
    22  ${CMAKE_SOURCE_DIR}
    33  ${CMAKE_BINARY_DIR}
    4   ${GLPK_INCLUDE_DIR}
    54)
    65
  • lemon/CMakeLists.txt

    r473 r474  
    22  ${CMAKE_SOURCE_DIR}
    33  ${CMAKE_BINARY_DIR}
    4   ${GLPK_INCLUDE_DIR}
    54)
    65
     
    2019IF(HAVE_GLPK)
    2120  SET(LEMON_SOURCES ${LEMON_SOURCES} glpk.cc)
     21  INCLUDE_DIRECTORIES(${GLPK_INCLUDE_DIR})
     22  IF(WIN32)
     23    INSTALL(FILES ${GLPK_BIN_DIR}/glpk.dll DESTINATION bin)
     24    INSTALL(FILES ${GLPK_BIN_DIR}/libltdl3.dll DESTINATION bin)
     25    INSTALL(FILES ${GLPK_BIN_DIR}/zlib1.dll DESTINATION bin)
     26  ENDIF(WIN32)
    2227ENDIF(HAVE_GLPK)
    2328
     
    3439  COMPONENT headers
    3540  FILES_MATCHING PATTERN "*.h")
    36 
    37 IF(WIN32)
    38   INSTALL(FILES ${GLPK_BIN_DIR}/glpk.dll DESTINATION bin)
    39   INSTALL(FILES ${GLPK_BIN_DIR}/libltdl3.dll DESTINATION bin)
    40   INSTALL(FILES ${GLPK_BIN_DIR}/zlib1.dll DESTINATION bin)
    41 ENDIF(WIN32)
  • test/CMakeLists.txt

    r473 r474  
    22  ${CMAKE_SOURCE_DIR}
    33  ${CMAKE_BINARY_DIR}
    4   ${GLPK_INCLUDE_DIR}
    54)
     5
     6IF(HAVE_GLPK)
     7  INCLUDE_DIRECTORIES(${GLPK_INCLUDE_DIR})
     8ENDIF(HAVE_GLPK)
    69
    710LINK_DIRECTORIES(${CMAKE_BINARY_DIR}/lemon)
     
    3639IF(HAVE_LP)
    3740  ADD_EXECUTABLE(lp_test lp_test.cc)
    38   TARGET_LINK_LIBRARIES(lp_test lemon ${GLPK_LIBRARIES})
     41  IF(HAVE_GLPK)
     42    TARGET_LINK_LIBRARIES(lp_test lemon ${GLPK_LIBRARIES})
     43  ENDIF(HAVE_GLPK)
    3944  ADD_TEST(lp_test lp_test)
    4045
    41   IF(WIN32)
     46  IF(WIN32 AND HAVE_GLPK)
    4247    GET_TARGET_PROPERTY(TARGET_LOC lp_test LOCATION)
    4348    GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
     
    4752      COMMAND cmake -E copy ${GLPK_BIN_DIR}/zlib1.dll ${TARGET_PATH}
    4853    )
    49   ENDIF(WIN32)
     54  ENDIF(WIN32 AND HAVE_GLPK)
    5055ENDIF(HAVE_LP)
    5156
    5257IF(HAVE_MIP)
    5358  ADD_EXECUTABLE(mip_test mip_test.cc)
    54   TARGET_LINK_LIBRARIES(mip_test lemon ${GLPK_LIBRARIES})
     59  IF(HAVE_GLPK)
     60    TARGET_LINK_LIBRARIES(mip_test lemon ${GLPK_LIBRARIES})
     61  ENDIF(HAVE_GLPK)
    5562  ADD_TEST(mip_test mip_test)
    5663
    57   IF(WIN32)
     64  IF(WIN32 AND HAVE_GLPK)
    5865    GET_TARGET_PROPERTY(TARGET_LOC mip_test LOCATION)
    5966    GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
     
    6370      COMMAND cmake -E copy ${GLPK_BIN_DIR}/zlib1.dll ${TARGET_PATH}
    6471    )
    65   ENDIF(WIN32)
     72  ENDIF(WIN32 AND HAVE_GLPK)
    6673ENDIF(HAVE_MIP)
    6774
Note: See TracChangeset for help on using the changeset viewer.