CMakeLists.txt
author Akos Ladanyi <ladanyi@tmit.bme.hu>
Thu, 28 May 2009 19:46:43 +0100
changeset 676 01d301395d03
parent 671 da70af8844b9
child 677 a0265f621d39
permissions -rw-r--r--
Change the label of the html project in Visual Studio
alpar@225
     1
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
alpar@225
     2
alpar@480
     3
IF(EXISTS ${CMAKE_SOURCE_DIR}/cmake/version.cmake)
alpar@480
     4
  INCLUDE(${CMAKE_SOURCE_DIR}/cmake/version.cmake)
alpar@480
     5
ELSE(EXISTS ${CMAKE_SOURCE_DIR}/cmake/version.cmake)
alpar@480
     6
  SET(PROJECT_NAME "LEMON")
alpar@480
     7
  SET(PROJECT_VERSION "hg-tip" CACHE STRING "LEMON version string.")
alpar@480
     8
ENDIF(EXISTS ${CMAKE_SOURCE_DIR}/cmake/version.cmake)
alpar@225
     9
alpar@225
    10
PROJECT(${PROJECT_NAME})
alpar@225
    11
ladanyi@549
    12
SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
alpar@225
    13
alpar@225
    14
INCLUDE(FindDoxygen)
alpar@225
    15
INCLUDE(FindGhostscript)
ladanyi@473
    16
FIND_PACKAGE(GLPK 4.33)
ladanyi@620
    17
FIND_PACKAGE(CPLEX)
ladanyi@621
    18
FIND_PACKAGE(COIN)
ladanyi@473
    19
alpar@496
    20
INCLUDE(CheckTypeSize)
ladanyi@511
    21
CHECK_TYPE_SIZE("long long" LEMON_LONG_LONG)
alpar@496
    22
alpar@225
    23
ENABLE_TESTING()
alpar@225
    24
alpar@225
    25
ADD_SUBDIRECTORY(lemon)
ladanyi@549
    26
IF(${CMAKE_SOURCE_DIR} STREQUAL ${PROJECT_SOURCE_DIR})
ladanyi@549
    27
  ADD_SUBDIRECTORY(demo)
ladanyi@549
    28
  ADD_SUBDIRECTORY(tools)
ladanyi@549
    29
  ADD_SUBDIRECTORY(doc)
ladanyi@549
    30
  ADD_SUBDIRECTORY(test)
ladanyi@549
    31
ENDIF(${CMAKE_SOURCE_DIR} STREQUAL ${PROJECT_SOURCE_DIR})
alpar@225
    32
ladanyi@675
    33
CONFIGURE_FILE(
ladanyi@675
    34
  ${PROJECT_SOURCE_DIR}/cmake/LEMONConfig.cmake.in
ladanyi@675
    35
  ${PROJECT_BINARY_DIR}/cmake/LEMONConfig.cmake
ladanyi@675
    36
  @ONLY
ladanyi@675
    37
)
ladanyi@675
    38
IF(UNIX)
ladanyi@675
    39
  INSTALL(
ladanyi@675
    40
    FILES ${PROJECT_BINARY_DIR}/cmake/LEMONConfig.cmake
ladanyi@675
    41
    DESTINATION share/lemon/cmake
ladanyi@675
    42
  )
ladanyi@675
    43
ELSEIF(WIN32)
ladanyi@675
    44
  INSTALL(
ladanyi@675
    45
    FILES ${PROJECT_BINARY_DIR}/cmake/LEMONConfig.cmake
ladanyi@675
    46
    DESTINATION cmake
ladanyi@675
    47
  )
ladanyi@675
    48
ENDIF(UNIX)
ladanyi@675
    49
ladanyi@552
    50
IF(${CMAKE_SOURCE_DIR} STREQUAL ${PROJECT_SOURCE_DIR})
ladanyi@552
    51
  IF(WIN32)
ladanyi@552
    52
    SET(CPACK_PACKAGE_NAME ${PROJECT_NAME})
ladanyi@552
    53
    SET(CPACK_PACKAGE_VENDOR "EGRES")
ladanyi@552
    54
    SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY
kpeter@658
    55
      "LEMON - Library for Efficient Modeling and Optimization in Networks")
ladanyi@552
    56
    SET(CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/LICENSE")
alpar@225
    57
ladanyi@552
    58
    SET(CPACK_PACKAGE_VERSION ${PROJECT_VERSION})
alpar@225
    59
ladanyi@552
    60
    SET(CPACK_PACKAGE_INSTALL_DIRECTORY
ladanyi@552
    61
      "${PROJECT_NAME} ${PROJECT_VERSION}")
ladanyi@552
    62
    SET(CPACK_PACKAGE_INSTALL_REGISTRY_KEY
ladanyi@552
    63
      "${PROJECT_NAME} ${PROJECT_VERSION}")
alpar@225
    64
ladanyi@552
    65
    SET(CPACK_COMPONENTS_ALL headers library html_documentation bin)
alpar@225
    66
ladanyi@552
    67
    SET(CPACK_COMPONENT_HEADERS_DISPLAY_NAME "C++ headers")
ladanyi@552
    68
    SET(CPACK_COMPONENT_LIBRARY_DISPLAY_NAME "Dynamic-link library")
ladanyi@552
    69
    SET(CPACK_COMPONENT_BIN_DISPLAY_NAME "Command line utilities")
ladanyi@552
    70
    SET(CPACK_COMPONENT_HTML_DOCUMENTATION_DISPLAY_NAME "HTML documentation")
alpar@225
    71
ladanyi@552
    72
    SET(CPACK_COMPONENT_HEADERS_DESCRIPTION
ladanyi@552
    73
      "C++ header files")
ladanyi@552
    74
    SET(CPACK_COMPONENT_LIBRARY_DESCRIPTION
ladanyi@552
    75
      "DLL and import library")
ladanyi@552
    76
    SET(CPACK_COMPONENT_BIN_DESCRIPTION
ladanyi@552
    77
      "Command line utilities")
ladanyi@552
    78
    SET(CPACK_COMPONENT_HTML_DOCUMENTATION_DESCRIPTION
ladanyi@552
    79
      "Doxygen generated documentation")
alpar@225
    80
ladanyi@552
    81
    SET(CPACK_COMPONENT_HEADERS_DEPENDS library)
alpar@225
    82
ladanyi@552
    83
    SET(CPACK_COMPONENT_HEADERS_GROUP "Development")
ladanyi@552
    84
    SET(CPACK_COMPONENT_LIBRARY_GROUP "Development")
ladanyi@552
    85
    SET(CPACK_COMPONENT_HTML_DOCUMENTATION_GROUP "Documentation")
alpar@225
    86
ladanyi@552
    87
    SET(CPACK_COMPONENT_GROUP_DEVELOPMENT_DESCRIPTION
ladanyi@552
    88
      "Components needed to develop software using LEMON")
ladanyi@552
    89
    SET(CPACK_COMPONENT_GROUP_DOCUMENTATION_DESCRIPTION
ladanyi@552
    90
      "Documentation of LEMON")
alpar@225
    91
ladanyi@552
    92
    SET(CPACK_ALL_INSTALL_TYPES Full Developer)
alpar@225
    93
ladanyi@552
    94
    SET(CPACK_COMPONENT_HEADERS_INSTALL_TYPES Developer Full)
ladanyi@552
    95
    SET(CPACK_COMPONENT_LIBRARY_INSTALL_TYPES Developer Full)
ladanyi@552
    96
    SET(CPACK_COMPONENT_HTML_DOCUMENTATION_INSTALL_TYPES Full)
alpar@225
    97
ladanyi@552
    98
    SET(CPACK_GENERATOR "NSIS")
ladanyi@552
    99
    SET(CPACK_NSIS_MUI_ICON "${PROJECT_SOURCE_DIR}/cmake/nsis/lemon.ico")
ladanyi@552
   100
    SET(CPACK_NSIS_MUI_UNIICON "${PROJECT_SOURCE_DIR}/cmake/nsis/uninstall.ico")
ladanyi@552
   101
    #SET(CPACK_PACKAGE_ICON "${PROJECT_SOURCE_DIR}/cmake/nsis\\\\installer.bmp")
ladanyi@552
   102
    SET(CPACK_NSIS_INSTALLED_ICON_NAME "bin\\\\lemon.ico")
ladanyi@552
   103
    SET(CPACK_NSIS_DISPLAY_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY} ${PROJECT_NAME}")
ladanyi@552
   104
    SET(CPACK_NSIS_HELP_LINK "http:\\\\\\\\lemon.cs.elte.hu")
ladanyi@552
   105
    SET(CPACK_NSIS_URL_INFO_ABOUT "http:\\\\\\\\lemon.cs.elte.hu")
ladanyi@552
   106
    SET(CPACK_NSIS_CONTACT "lemon-user@lemon.cs.elte.hu")
ladanyi@552
   107
    SET(CPACK_NSIS_CREATE_ICONS_EXTRA "
ladanyi@552
   108
      CreateShortCut \\\"$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\Documentation.lnk\\\" \\\"$INSTDIR\\\\share\\\\doc\\\\index.html\\\"
ladanyi@552
   109
      ")
ladanyi@552
   110
    SET(CPACK_NSIS_DELETE_ICONS_EXTRA "
ladanyi@552
   111
      !insertmacro MUI_STARTMENU_GETFOLDER Application $MUI_TEMP
ladanyi@552
   112
      Delete \\\"$SMPROGRAMS\\\\$MUI_TEMP\\\\Documentation.lnk\\\"
ladanyi@552
   113
      ")
alpar@225
   114
ladanyi@552
   115
    INCLUDE(CPack)
ladanyi@552
   116
  ENDIF(WIN32)
ladanyi@552
   117
ENDIF(${CMAKE_SOURCE_DIR} STREQUAL ${PROJECT_SOURCE_DIR})