COIN-OR::LEMON - Graph Library

Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • CMakeLists.txt

    r540 r727  
    11CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
    22
    3 IF(EXISTS ${CMAKE_SOURCE_DIR}/cmake/version.cmake)
    4   INCLUDE(${CMAKE_SOURCE_DIR}/cmake/version.cmake)
    5 ELSE(EXISTS ${CMAKE_SOURCE_DIR}/cmake/version.cmake)
    6   SET(PROJECT_NAME "LEMON")
    7   SET(PROJECT_VERSION "hg-tip" CACHE STRING "LEMON version string.")
    8 ENDIF(EXISTS ${CMAKE_SOURCE_DIR}/cmake/version.cmake)
    9 
     3SET(PROJECT_NAME "LEMON")
    104PROJECT(${PROJECT_NAME})
    115
    12 SET(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
     6IF(EXISTS ${PROJECT_SOURCE_DIR}/cmake/version.cmake)
     7  INCLUDE(${PROJECT_SOURCE_DIR}/cmake/version.cmake)
     8ELSEIF(DEFINED ENV{LEMON_VERSION})
     9  SET(LEMON_VERSION $ENV{LEMON_VERSION} CACHE STRING "LEMON version string.")
     10ELSE()
     11  EXECUTE_PROCESS(
     12    COMMAND hg id -i
     13    WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
     14    OUTPUT_VARIABLE HG_REVISION
     15    ERROR_QUIET
     16    OUTPUT_STRIP_TRAILING_WHITESPACE
     17  )
     18  IF(HG_REVISION STREQUAL "")
     19    SET(HG_REVISION "hg-tip")
     20  ENDIF()
     21  SET(LEMON_VERSION ${HG_REVISION} CACHE STRING "LEMON version string.")
     22ENDIF()
    1323
    14 INCLUDE(FindDoxygen)
    15 INCLUDE(FindGhostscript)
     24SET(PROJECT_VERSION ${LEMON_VERSION})
    1625
    17 ADD_DEFINITIONS(-DHAVE_CONFIG_H)
     26SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
     27
     28FIND_PACKAGE(Doxygen)
     29FIND_PACKAGE(Ghostscript)
     30FIND_PACKAGE(GLPK 4.33)
     31FIND_PACKAGE(CPLEX)
     32FIND_PACKAGE(COIN)
    1833
    1934INCLUDE(CheckTypeSize)
    20 CHECK_TYPE_SIZE("long long" LEMON_LONG_LONG)
     35CHECK_TYPE_SIZE("long long" LONG_LONG)
     36SET(LEMON_HAVE_LONG_LONG ${HAVE_LONG_LONG})
    2137
    2238ENABLE_TESTING()
    2339
    2440ADD_SUBDIRECTORY(lemon)
    25 ADD_SUBDIRECTORY(demo)
    26 ADD_SUBDIRECTORY(doc)
    27 ADD_SUBDIRECTORY(test)
     41IF(${CMAKE_SOURCE_DIR} STREQUAL ${PROJECT_SOURCE_DIR})
     42  ADD_SUBDIRECTORY(demo)
     43  ADD_SUBDIRECTORY(tools)
     44  ADD_SUBDIRECTORY(doc)
     45  ADD_SUBDIRECTORY(test)
     46ENDIF()
    2847
    29 IF(WIN32)
     48CONFIGURE_FILE(
     49  ${PROJECT_SOURCE_DIR}/cmake/LEMONConfig.cmake.in
     50  ${PROJECT_BINARY_DIR}/cmake/LEMONConfig.cmake
     51  @ONLY
     52)
     53IF(UNIX)
     54  INSTALL(
     55    FILES ${PROJECT_BINARY_DIR}/cmake/LEMONConfig.cmake
     56    DESTINATION share/lemon/cmake
     57  )
     58ELSEIF(WIN32)
     59  INSTALL(
     60    FILES ${PROJECT_BINARY_DIR}/cmake/LEMONConfig.cmake
     61    DESTINATION cmake
     62  )
     63ENDIF()
     64
     65IF(${CMAKE_SOURCE_DIR} STREQUAL ${PROJECT_SOURCE_DIR} AND WIN32)
    3066  SET(CPACK_PACKAGE_NAME ${PROJECT_NAME})
    3167  SET(CPACK_PACKAGE_VENDOR "EGRES")
    3268  SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY
    33     "LEMON - Library of Efficient Models and Optimization in Networks")
    34   SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE")
     69    "LEMON - Library for Efficient Modeling and Optimization in Networks")
     70  SET(CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/LICENSE")
    3571
    3672  SET(CPACK_PACKAGE_VERSION ${PROJECT_VERSION})
     
    4177    "${PROJECT_NAME} ${PROJECT_VERSION}")
    4278
    43   SET(CPACK_COMPONENTS_ALL headers library html_documentation)
     79  SET(CPACK_COMPONENTS_ALL headers library html_documentation bin)
    4480
    4581  SET(CPACK_COMPONENT_HEADERS_DISPLAY_NAME "C++ headers")
    4682  SET(CPACK_COMPONENT_LIBRARY_DISPLAY_NAME "Dynamic-link library")
     83  SET(CPACK_COMPONENT_BIN_DISPLAY_NAME "Command line utilities")
    4784  SET(CPACK_COMPONENT_HTML_DOCUMENTATION_DISPLAY_NAME "HTML documentation")
    4885
     
    5188  SET(CPACK_COMPONENT_LIBRARY_DESCRIPTION
    5289    "DLL and import library")
     90  SET(CPACK_COMPONENT_BIN_DESCRIPTION
     91    "Command line utilities")
    5392  SET(CPACK_COMPONENT_HTML_DOCUMENTATION_DESCRIPTION
    5493    "Doxygen generated documentation")
     
    72111
    73112  SET(CPACK_GENERATOR "NSIS")
    74   SET(CPACK_NSIS_MUI_ICON "${CMAKE_SOURCE_DIR}/cmake/nsis/lemon.ico")
    75   SET(CPACK_NSIS_MUI_UNIICON "${CMAKE_SOURCE_DIR}/cmake/nsis/uninstall.ico")
    76   #SET(CPACK_PACKAGE_ICON "${CMAKE_SOURCE_DIR}/cmake/nsis\\\\installer.bmp")
     113  SET(CPACK_NSIS_MUI_ICON "${PROJECT_SOURCE_DIR}/cmake/nsis/lemon.ico")
     114  SET(CPACK_NSIS_MUI_UNIICON "${PROJECT_SOURCE_DIR}/cmake/nsis/uninstall.ico")
     115  #SET(CPACK_PACKAGE_ICON "${PROJECT_SOURCE_DIR}/cmake/nsis\\\\installer.bmp")
    77116  SET(CPACK_NSIS_INSTALLED_ICON_NAME "bin\\\\lemon.ico")
    78117  SET(CPACK_NSIS_DISPLAY_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY} ${PROJECT_NAME}")
     
    89128
    90129  INCLUDE(CPack)
    91 ENDIF(WIN32)
     130ENDIF()
Note: See TracChangeset for help on using the changeset viewer.