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