lemon/CMakeLists.txt
changeset 783 ef88c0a30f85
parent 675 c5dc4d3124aa
child 908 10242c611190
     1.1 --- a/lemon/CMakeLists.txt	Mon Jan 12 23:11:39 2009 +0100
     1.2 +++ b/lemon/CMakeLists.txt	Thu Nov 05 15:48:01 2009 +0100
     1.3 @@ -1,18 +1,68 @@
     1.4 -INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR})
     1.5 +INCLUDE_DIRECTORIES(
     1.6 +  ${PROJECT_SOURCE_DIR}
     1.7 +  ${PROJECT_BINARY_DIR}
     1.8 +)
     1.9  
    1.10 -ADD_LIBRARY(lemon
    1.11 +CONFIGURE_FILE(
    1.12 +  ${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake
    1.13 +  ${CMAKE_CURRENT_BINARY_DIR}/config.h
    1.14 +)
    1.15 +
    1.16 +SET(LEMON_SOURCES
    1.17    arg_parser.cc
    1.18    base.cc
    1.19    color.cc
    1.20 -  random.cc)
    1.21 +  lp_base.cc
    1.22 +  lp_skeleton.cc
    1.23 +  random.cc
    1.24 +  bits/windows.cc
    1.25 +)
    1.26 +
    1.27 +IF(LEMON_HAVE_GLPK)
    1.28 +  SET(LEMON_SOURCES ${LEMON_SOURCES} glpk.cc)
    1.29 +  INCLUDE_DIRECTORIES(${GLPK_INCLUDE_DIRS})
    1.30 +  IF(WIN32)
    1.31 +    INSTALL(FILES ${GLPK_BIN_DIR}/glpk.dll DESTINATION bin)
    1.32 +    INSTALL(FILES ${GLPK_BIN_DIR}/libltdl3.dll DESTINATION bin)
    1.33 +    INSTALL(FILES ${GLPK_BIN_DIR}/zlib1.dll DESTINATION bin)
    1.34 +  ENDIF()
    1.35 +ENDIF()
    1.36 +
    1.37 +IF(LEMON_HAVE_CPLEX)
    1.38 +  SET(LEMON_SOURCES ${LEMON_SOURCES} cplex.cc)
    1.39 +  INCLUDE_DIRECTORIES(${CPLEX_INCLUDE_DIRS})
    1.40 +ENDIF()
    1.41 +
    1.42 +IF(LEMON_HAVE_CLP)
    1.43 +  SET(LEMON_SOURCES ${LEMON_SOURCES} clp.cc)
    1.44 +  INCLUDE_DIRECTORIES(${COIN_INCLUDE_DIRS})
    1.45 +ENDIF()
    1.46 +
    1.47 +IF(LEMON_HAVE_CBC)
    1.48 +  SET(LEMON_SOURCES ${LEMON_SOURCES} cbc.cc)
    1.49 +  INCLUDE_DIRECTORIES(${COIN_INCLUDE_DIRS})
    1.50 +ENDIF()
    1.51 +
    1.52 +ADD_LIBRARY(lemon ${LEMON_SOURCES})
    1.53 +IF(UNIX)
    1.54 +  SET_TARGET_PROPERTIES(lemon PROPERTIES OUTPUT_NAME emon)
    1.55 +ENDIF()
    1.56  
    1.57  INSTALL(
    1.58    TARGETS lemon
    1.59    ARCHIVE DESTINATION lib
    1.60 -  COMPONENT library)
    1.61 +  COMPONENT library
    1.62 +)
    1.63  
    1.64  INSTALL(
    1.65    DIRECTORY . bits concepts
    1.66    DESTINATION include/lemon
    1.67    COMPONENT headers
    1.68 -  FILES_MATCHING PATTERN "*.h")
    1.69 +  FILES_MATCHING PATTERN "*.h"
    1.70 +)
    1.71 +
    1.72 +INSTALL(
    1.73 +  FILES ${CMAKE_CURRENT_BINARY_DIR}/config.h
    1.74 +  DESTINATION include/lemon
    1.75 +  COMPONENT headers
    1.76 +)