diff --git a/lemon/CMakeLists.txt b/lemon/CMakeLists.txt --- a/lemon/CMakeLists.txt +++ b/lemon/CMakeLists.txt @@ -1,11 +1,28 @@ -INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}) +INCLUDE_DIRECTORIES( + ${CMAKE_SOURCE_DIR} + ${CMAKE_BINARY_DIR} + ${GLPK_INCLUDE_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 + lp_base.cc + lp_skeleton.cc random.cc) +IF(HAVE_GLPK) + SET(LEMON_SOURCES ${LEMON_SOURCES} glpk.cc) +ENDIF(HAVE_GLPK) + +ADD_LIBRARY(lemon ${LEMON_SOURCES}) + INSTALL( TARGETS lemon ARCHIVE DESTINATION lib @@ -16,3 +33,9 @@ DESTINATION include/lemon COMPONENT headers FILES_MATCHING PATTERN "*.h") + +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(WIN32)