lemon/CMakeLists.txt
changeset 489 2a136de8e3f2
parent 473 17d918051964
child 492 b9b3473327e3
equal deleted inserted replaced
4:53e74bc83538 5:dfcb47330000
     1 INCLUDE_DIRECTORIES(
     1 INCLUDE_DIRECTORIES(
     2   ${CMAKE_SOURCE_DIR}
     2   ${CMAKE_SOURCE_DIR}
     3   ${CMAKE_BINARY_DIR}
     3   ${CMAKE_BINARY_DIR}
     4   ${GLPK_INCLUDE_DIR}
       
     5 )
     4 )
     6 
     5 
     7 CONFIGURE_FILE(
     6 CONFIGURE_FILE(
     8   ${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake
     7   ${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake
     9   ${CMAKE_CURRENT_BINARY_DIR}/config.h
     8   ${CMAKE_CURRENT_BINARY_DIR}/config.h
    17   lp_skeleton.cc
    16   lp_skeleton.cc
    18   random.cc)
    17   random.cc)
    19 
    18 
    20 IF(HAVE_GLPK)
    19 IF(HAVE_GLPK)
    21   SET(LEMON_SOURCES ${LEMON_SOURCES} glpk.cc)
    20   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)
    22 ENDIF(HAVE_GLPK)
    27 ENDIF(HAVE_GLPK)
    23 
    28 
    24 ADD_LIBRARY(lemon ${LEMON_SOURCES})
    29 ADD_LIBRARY(lemon ${LEMON_SOURCES})
    25 
    30 
    26 INSTALL(
    31 INSTALL(
    31 INSTALL(
    36 INSTALL(
    32   DIRECTORY . bits concepts
    37   DIRECTORY . bits concepts
    33   DESTINATION include/lemon
    38   DESTINATION include/lemon
    34   COMPONENT headers
    39   COMPONENT headers
    35   FILES_MATCHING PATTERN "*.h")
    40   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)