CMakeLists.txt
author Alpar Juttner <alpar@cs.elte.hu>
Thu, 05 Mar 2009 06:51:53 +0000
changeset 536 097d7c4634ea
parent 496 7992dcb0d0e6
child 502 8668e1b5dafb
child 620 d8ca76573eb3
permissions -rw-r--r--
Fix missing 'inline' specifier in time_measure.h (#239)
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
alpar@225
    12
SET(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
alpar@225
    13
alpar@225
    14
INCLUDE(FindDoxygen)
alpar@225
    15
INCLUDE(FindGhostscript)
alpar@225
    16
alpar@496
    17
INCLUDE(CheckTypeSize)
alpar@496
    18
CHECK_TYPE_SIZE("long long" LONG_LONG)
alpar@496
    19
alpar@225
    20
ENABLE_TESTING()
alpar@225
    21
alpar@225
    22
ADD_SUBDIRECTORY(lemon)
alpar@225
    23
ADD_SUBDIRECTORY(demo)
alpar@225
    24
ADD_SUBDIRECTORY(doc)
alpar@225
    25
ADD_SUBDIRECTORY(test)
alpar@225
    26
alpar@225
    27
IF(WIN32)
alpar@225
    28
  SET(CPACK_PACKAGE_NAME ${PROJECT_NAME})
ladanyi@479
    29
  SET(CPACK_PACKAGE_VENDOR "EGRES")
alpar@225
    30
  SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY
ladanyi@236
    31
    "LEMON - Library of Efficient Models and Optimization in Networks")
alpar@225
    32
  SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE")
alpar@225
    33
alpar@225
    34
  SET(CPACK_PACKAGE_VERSION ${PROJECT_VERSION})
alpar@225
    35
alpar@225
    36
  SET(CPACK_PACKAGE_INSTALL_DIRECTORY
ladanyi@274
    37
    "${PROJECT_NAME} ${PROJECT_VERSION}")
alpar@225
    38
  SET(CPACK_PACKAGE_INSTALL_REGISTRY_KEY
ladanyi@274
    39
    "${PROJECT_NAME} ${PROJECT_VERSION}")
alpar@225
    40
ladanyi@479
    41
  SET(CPACK_COMPONENTS_ALL headers library html_documentation)
alpar@225
    42
ladanyi@479
    43
  SET(CPACK_COMPONENT_HEADERS_DISPLAY_NAME "C++ headers")
ladanyi@479
    44
  SET(CPACK_COMPONENT_LIBRARY_DISPLAY_NAME "Dynamic-link library")
ladanyi@479
    45
  SET(CPACK_COMPONENT_HTML_DOCUMENTATION_DISPLAY_NAME "HTML documentation")
alpar@225
    46
ladanyi@479
    47
  SET(CPACK_COMPONENT_HEADERS_DESCRIPTION
ladanyi@479
    48
    "C++ header files")
ladanyi@479
    49
  SET(CPACK_COMPONENT_LIBRARY_DESCRIPTION
ladanyi@479
    50
    "DLL and import library")
ladanyi@479
    51
  SET(CPACK_COMPONENT_HTML_DOCUMENTATION_DESCRIPTION
ladanyi@479
    52
    "Doxygen generated documentation")
alpar@225
    53
ladanyi@479
    54
  SET(CPACK_COMPONENT_HEADERS_DEPENDS library)
alpar@225
    55
ladanyi@479
    56
  SET(CPACK_COMPONENT_HEADERS_GROUP "Development")
ladanyi@479
    57
  SET(CPACK_COMPONENT_LIBRARY_GROUP "Development")
ladanyi@479
    58
  SET(CPACK_COMPONENT_HTML_DOCUMENTATION_GROUP "Documentation")
alpar@225
    59
ladanyi@479
    60
  SET(CPACK_COMPONENT_GROUP_DEVELOPMENT_DESCRIPTION
ladanyi@479
    61
    "Components needed to develop software using LEMON")
ladanyi@479
    62
  SET(CPACK_COMPONENT_GROUP_DOCUMENTATION_DESCRIPTION
ladanyi@479
    63
    "Documentation of LEMON")
alpar@225
    64
ladanyi@479
    65
  SET(CPACK_ALL_INSTALL_TYPES Full Developer)
alpar@225
    66
ladanyi@479
    67
  SET(CPACK_COMPONENT_HEADERS_INSTALL_TYPES Developer Full)
ladanyi@479
    68
  SET(CPACK_COMPONENT_LIBRARY_INSTALL_TYPES Developer Full)
ladanyi@479
    69
  SET(CPACK_COMPONENT_HTML_DOCUMENTATION_INSTALL_TYPES Full)
alpar@225
    70
alpar@225
    71
  SET(CPACK_GENERATOR "NSIS")
alpar@225
    72
  SET(CPACK_NSIS_MUI_ICON "${CMAKE_SOURCE_DIR}/cmake/nsis/lemon.ico")
alpar@225
    73
  SET(CPACK_NSIS_MUI_UNIICON "${CMAKE_SOURCE_DIR}/cmake/nsis/uninstall.ico")
alpar@225
    74
  #SET(CPACK_PACKAGE_ICON "${CMAKE_SOURCE_DIR}/cmake/nsis\\\\installer.bmp")
alpar@225
    75
  SET(CPACK_NSIS_INSTALLED_ICON_NAME "bin\\\\lemon.ico")
alpar@225
    76
  SET(CPACK_NSIS_DISPLAY_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY} ${PROJECT_NAME}")
alpar@225
    77
  SET(CPACK_NSIS_HELP_LINK "http:\\\\\\\\lemon.cs.elte.hu")
alpar@225
    78
  SET(CPACK_NSIS_URL_INFO_ABOUT "http:\\\\\\\\lemon.cs.elte.hu")
alpar@225
    79
  SET(CPACK_NSIS_CONTACT "lemon-user@lemon.cs.elte.hu")
alpar@225
    80
  SET(CPACK_NSIS_CREATE_ICONS_EXTRA "
alpar@501
    81
    CreateShortCut \\\"$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\Documentation.lnk\\\" \\\"$INSTDIR\\\\share\\\\doc\\\\index.html\\\"
alpar@225
    82
    ")
alpar@225
    83
  SET(CPACK_NSIS_DELETE_ICONS_EXTRA "
alpar@225
    84
    !insertmacro MUI_STARTMENU_GETFOLDER Application $MUI_TEMP
alpar@225
    85
    Delete \\\"$SMPROGRAMS\\\\$MUI_TEMP\\\\Documentation.lnk\\\"
alpar@225
    86
    ")
alpar@225
    87
alpar@225
    88
  INCLUDE(CPack)
alpar@225
    89
ENDIF(WIN32)