CMakeLists.txt
author Alpar Juttner <alpar@cs.elte.hu>
Wed, 13 May 2009 09:58:09 +0100
branch1.1
changeset 671 73ee142260f2
parent 656 ebdcc68fe79e
child 672 da70af8844b9
permissions -rw-r--r--
LEMON 1.1 released (06f816565bef tagged as r1.1)
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@538
    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@612
    17
FIND_PACKAGE(CPLEX)
ladanyi@613
    18
FIND_PACKAGE(COIN)
ladanyi@473
    19
alpar@477
    20
IF(MSVC)
kpeter@667
    21
  SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4250 /wd4355 /wd4503 /wd4800 /wd4996")
alpar@477
    22
# Suppressed warnings:
alpar@477
    23
# C4250: 'class1' : inherits 'class2::member' via dominance
alpar@477
    24
# C4355: 'this' : used in base member initializer list
kpeter@667
    25
# C4503: 'function' : decorated name length exceeded, name was truncated
alpar@477
    26
# C4800: 'type' : forcing value to bool 'true' or 'false' (performance warning)
alpar@477
    27
# C4996: 'function': was declared deprecated
alpar@477
    28
ENDIF(MSVC)
alpar@225
    29
alpar@496
    30
INCLUDE(CheckTypeSize)
ladanyi@621
    31
CHECK_TYPE_SIZE("long long" LEMON_LONG_LONG)
alpar@496
    32
alpar@225
    33
ENABLE_TESTING()
alpar@225
    34
alpar@225
    35
ADD_SUBDIRECTORY(lemon)
ladanyi@538
    36
IF(${CMAKE_SOURCE_DIR} STREQUAL ${PROJECT_SOURCE_DIR})
ladanyi@538
    37
  ADD_SUBDIRECTORY(demo)
ladanyi@538
    38
  ADD_SUBDIRECTORY(tools)
ladanyi@538
    39
  ADD_SUBDIRECTORY(doc)
ladanyi@538
    40
  ADD_SUBDIRECTORY(test)
ladanyi@538
    41
ENDIF(${CMAKE_SOURCE_DIR} STREQUAL ${PROJECT_SOURCE_DIR})
alpar@225
    42
ladanyi@541
    43
IF(${CMAKE_SOURCE_DIR} STREQUAL ${PROJECT_SOURCE_DIR})
ladanyi@541
    44
  IF(WIN32)
ladanyi@541
    45
    SET(CPACK_PACKAGE_NAME ${PROJECT_NAME})
ladanyi@541
    46
    SET(CPACK_PACKAGE_VENDOR "EGRES")
ladanyi@541
    47
    SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY
kpeter@656
    48
      "LEMON - Library for Efficient Modeling and Optimization in Networks")
ladanyi@541
    49
    SET(CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/LICENSE")
alpar@225
    50
ladanyi@541
    51
    SET(CPACK_PACKAGE_VERSION ${PROJECT_VERSION})
alpar@225
    52
ladanyi@541
    53
    SET(CPACK_PACKAGE_INSTALL_DIRECTORY
ladanyi@541
    54
      "${PROJECT_NAME} ${PROJECT_VERSION}")
ladanyi@541
    55
    SET(CPACK_PACKAGE_INSTALL_REGISTRY_KEY
ladanyi@541
    56
      "${PROJECT_NAME} ${PROJECT_VERSION}")
alpar@225
    57
ladanyi@541
    58
    SET(CPACK_COMPONENTS_ALL headers library html_documentation bin)
alpar@225
    59
ladanyi@541
    60
    SET(CPACK_COMPONENT_HEADERS_DISPLAY_NAME "C++ headers")
ladanyi@541
    61
    SET(CPACK_COMPONENT_LIBRARY_DISPLAY_NAME "Dynamic-link library")
ladanyi@541
    62
    SET(CPACK_COMPONENT_BIN_DISPLAY_NAME "Command line utilities")
ladanyi@541
    63
    SET(CPACK_COMPONENT_HTML_DOCUMENTATION_DISPLAY_NAME "HTML documentation")
alpar@225
    64
ladanyi@541
    65
    SET(CPACK_COMPONENT_HEADERS_DESCRIPTION
ladanyi@541
    66
      "C++ header files")
ladanyi@541
    67
    SET(CPACK_COMPONENT_LIBRARY_DESCRIPTION
ladanyi@541
    68
      "DLL and import library")
ladanyi@541
    69
    SET(CPACK_COMPONENT_BIN_DESCRIPTION
ladanyi@541
    70
      "Command line utilities")
ladanyi@541
    71
    SET(CPACK_COMPONENT_HTML_DOCUMENTATION_DESCRIPTION
ladanyi@541
    72
      "Doxygen generated documentation")
alpar@225
    73
ladanyi@541
    74
    SET(CPACK_COMPONENT_HEADERS_DEPENDS library)
alpar@225
    75
ladanyi@541
    76
    SET(CPACK_COMPONENT_HEADERS_GROUP "Development")
ladanyi@541
    77
    SET(CPACK_COMPONENT_LIBRARY_GROUP "Development")
ladanyi@541
    78
    SET(CPACK_COMPONENT_HTML_DOCUMENTATION_GROUP "Documentation")
alpar@225
    79
ladanyi@541
    80
    SET(CPACK_COMPONENT_GROUP_DEVELOPMENT_DESCRIPTION
ladanyi@541
    81
      "Components needed to develop software using LEMON")
ladanyi@541
    82
    SET(CPACK_COMPONENT_GROUP_DOCUMENTATION_DESCRIPTION
ladanyi@541
    83
      "Documentation of LEMON")
alpar@225
    84
ladanyi@541
    85
    SET(CPACK_ALL_INSTALL_TYPES Full Developer)
alpar@225
    86
ladanyi@541
    87
    SET(CPACK_COMPONENT_HEADERS_INSTALL_TYPES Developer Full)
ladanyi@541
    88
    SET(CPACK_COMPONENT_LIBRARY_INSTALL_TYPES Developer Full)
ladanyi@541
    89
    SET(CPACK_COMPONENT_HTML_DOCUMENTATION_INSTALL_TYPES Full)
alpar@225
    90
ladanyi@541
    91
    SET(CPACK_GENERATOR "NSIS")
ladanyi@541
    92
    SET(CPACK_NSIS_MUI_ICON "${PROJECT_SOURCE_DIR}/cmake/nsis/lemon.ico")
ladanyi@541
    93
    SET(CPACK_NSIS_MUI_UNIICON "${PROJECT_SOURCE_DIR}/cmake/nsis/uninstall.ico")
ladanyi@541
    94
    #SET(CPACK_PACKAGE_ICON "${PROJECT_SOURCE_DIR}/cmake/nsis\\\\installer.bmp")
ladanyi@541
    95
    SET(CPACK_NSIS_INSTALLED_ICON_NAME "bin\\\\lemon.ico")
ladanyi@541
    96
    SET(CPACK_NSIS_DISPLAY_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY} ${PROJECT_NAME}")
ladanyi@541
    97
    SET(CPACK_NSIS_HELP_LINK "http:\\\\\\\\lemon.cs.elte.hu")
ladanyi@541
    98
    SET(CPACK_NSIS_URL_INFO_ABOUT "http:\\\\\\\\lemon.cs.elte.hu")
ladanyi@541
    99
    SET(CPACK_NSIS_CONTACT "lemon-user@lemon.cs.elte.hu")
ladanyi@541
   100
    SET(CPACK_NSIS_CREATE_ICONS_EXTRA "
ladanyi@541
   101
      CreateShortCut \\\"$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\Documentation.lnk\\\" \\\"$INSTDIR\\\\share\\\\doc\\\\index.html\\\"
ladanyi@541
   102
      ")
ladanyi@541
   103
    SET(CPACK_NSIS_DELETE_ICONS_EXTRA "
ladanyi@541
   104
      !insertmacro MUI_STARTMENU_GETFOLDER Application $MUI_TEMP
ladanyi@541
   105
      Delete \\\"$SMPROGRAMS\\\\$MUI_TEMP\\\\Documentation.lnk\\\"
ladanyi@541
   106
      ")
alpar@225
   107
ladanyi@541
   108
    INCLUDE(CPack)
ladanyi@541
   109
  ENDIF(WIN32)
ladanyi@541
   110
ENDIF(${CMAKE_SOURCE_DIR} STREQUAL ${PROJECT_SOURCE_DIR})