diff -r c35afa9e89e7 -r ef88c0a30f85 lemon/CMakeLists.txt --- a/lemon/CMakeLists.txt Mon Jan 12 23:11:39 2009 +0100 +++ b/lemon/CMakeLists.txt Thu Nov 05 15:48:01 2009 +0100 @@ -1,18 +1,68 @@ -INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}) +INCLUDE_DIRECTORIES( + ${PROJECT_SOURCE_DIR} + ${PROJECT_BINARY_DIR} +) -ADD_LIBRARY(lemon +CONFIGURE_FILE( + ${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake + ${CMAKE_CURRENT_BINARY_DIR}/config.h +) + +SET(LEMON_SOURCES arg_parser.cc base.cc color.cc - random.cc) + lp_base.cc + lp_skeleton.cc + random.cc + bits/windows.cc +) + +IF(LEMON_HAVE_GLPK) + SET(LEMON_SOURCES ${LEMON_SOURCES} glpk.cc) + INCLUDE_DIRECTORIES(${GLPK_INCLUDE_DIRS}) + IF(WIN32) + INSTALL(FILES ${GLPK_BIN_DIR}/glpk.dll DESTINATION bin) + INSTALL(FILES ${GLPK_BIN_DIR}/libltdl3.dll DESTINATION bin) + INSTALL(FILES ${GLPK_BIN_DIR}/zlib1.dll DESTINATION bin) + ENDIF() +ENDIF() + +IF(LEMON_HAVE_CPLEX) + SET(LEMON_SOURCES ${LEMON_SOURCES} cplex.cc) + INCLUDE_DIRECTORIES(${CPLEX_INCLUDE_DIRS}) +ENDIF() + +IF(LEMON_HAVE_CLP) + SET(LEMON_SOURCES ${LEMON_SOURCES} clp.cc) + INCLUDE_DIRECTORIES(${COIN_INCLUDE_DIRS}) +ENDIF() + +IF(LEMON_HAVE_CBC) + SET(LEMON_SOURCES ${LEMON_SOURCES} cbc.cc) + INCLUDE_DIRECTORIES(${COIN_INCLUDE_DIRS}) +ENDIF() + +ADD_LIBRARY(lemon ${LEMON_SOURCES}) +IF(UNIX) + SET_TARGET_PROPERTIES(lemon PROPERTIES OUTPUT_NAME emon) +ENDIF() INSTALL( TARGETS lemon ARCHIVE DESTINATION lib - COMPONENT library) + COMPONENT library +) INSTALL( DIRECTORY . bits concepts DESTINATION include/lemon COMPONENT headers - FILES_MATCHING PATTERN "*.h") + FILES_MATCHING PATTERN "*.h" +) + +INSTALL( + FILES ${CMAKE_CURRENT_BINARY_DIR}/config.h + DESTINATION include/lemon + COMPONENT headers +)