alpar@225: CMAKE_MINIMUM_REQUIRED(VERSION 2.6) alpar@225: alpar@503: IF(EXISTS ${CMAKE_SOURCE_DIR}/cmake/version.cmake) alpar@503: INCLUDE(${CMAKE_SOURCE_DIR}/cmake/version.cmake) alpar@503: ELSE(EXISTS ${CMAKE_SOURCE_DIR}/cmake/version.cmake) alpar@503: SET(PROJECT_NAME "LEMON") alpar@503: SET(PROJECT_VERSION "hg-tip" CACHE STRING "LEMON version string.") alpar@503: ENDIF(EXISTS ${CMAKE_SOURCE_DIR}/cmake/version.cmake) alpar@225: alpar@225: PROJECT(${PROJECT_NAME}) alpar@225: ladanyi@596: SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake) alpar@225: alpar@225: INCLUDE(FindDoxygen) alpar@225: INCLUDE(FindGhostscript) ladanyi@496: FIND_PACKAGE(GLPK 4.33) ladanyi@667: FIND_PACKAGE(CPLEX) ladanyi@668: FIND_PACKAGE(COIN) ladanyi@496: alpar@554: IF(MSVC) kpeter@715: SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4250 /wd4355 /wd4503 /wd4800 /wd4996") alpar@554: # Suppressed warnings: alpar@554: # C4250: 'class1' : inherits 'class2::member' via dominance alpar@554: # C4355: 'this' : used in base member initializer list kpeter@715: # C4503: 'function' : decorated name length exceeded, name was truncated alpar@554: # C4800: 'type' : forcing value to bool 'true' or 'false' (performance warning) alpar@554: # C4996: 'function': was declared deprecated alpar@554: ENDIF(MSVC) alpar@225: alpar@515: INCLUDE(CheckTypeSize) ladanyi@540: CHECK_TYPE_SIZE("long long" LEMON_LONG_LONG) alpar@515: alpar@225: ENABLE_TESTING() alpar@225: alpar@225: ADD_SUBDIRECTORY(lemon) ladanyi@596: IF(${CMAKE_SOURCE_DIR} STREQUAL ${PROJECT_SOURCE_DIR}) ladanyi@596: ADD_SUBDIRECTORY(demo) ladanyi@596: ADD_SUBDIRECTORY(tools) ladanyi@596: ADD_SUBDIRECTORY(doc) ladanyi@596: ADD_SUBDIRECTORY(test) ladanyi@596: ENDIF(${CMAKE_SOURCE_DIR} STREQUAL ${PROJECT_SOURCE_DIR}) alpar@225: ladanyi@599: IF(${CMAKE_SOURCE_DIR} STREQUAL ${PROJECT_SOURCE_DIR}) ladanyi@599: IF(WIN32) ladanyi@599: SET(CPACK_PACKAGE_NAME ${PROJECT_NAME}) ladanyi@599: SET(CPACK_PACKAGE_VENDOR "EGRES") ladanyi@599: SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY kpeter@705: "LEMON - Library for Efficient Modeling and Optimization in Networks") ladanyi@599: SET(CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/LICENSE") alpar@225: ladanyi@599: SET(CPACK_PACKAGE_VERSION ${PROJECT_VERSION}) alpar@225: ladanyi@599: SET(CPACK_PACKAGE_INSTALL_DIRECTORY ladanyi@599: "${PROJECT_NAME} ${PROJECT_VERSION}") ladanyi@599: SET(CPACK_PACKAGE_INSTALL_REGISTRY_KEY ladanyi@599: "${PROJECT_NAME} ${PROJECT_VERSION}") alpar@225: ladanyi@599: SET(CPACK_COMPONENTS_ALL headers library html_documentation bin) alpar@225: ladanyi@599: SET(CPACK_COMPONENT_HEADERS_DISPLAY_NAME "C++ headers") ladanyi@599: SET(CPACK_COMPONENT_LIBRARY_DISPLAY_NAME "Dynamic-link library") ladanyi@599: SET(CPACK_COMPONENT_BIN_DISPLAY_NAME "Command line utilities") ladanyi@599: SET(CPACK_COMPONENT_HTML_DOCUMENTATION_DISPLAY_NAME "HTML documentation") alpar@225: ladanyi@599: SET(CPACK_COMPONENT_HEADERS_DESCRIPTION ladanyi@599: "C++ header files") ladanyi@599: SET(CPACK_COMPONENT_LIBRARY_DESCRIPTION ladanyi@599: "DLL and import library") ladanyi@599: SET(CPACK_COMPONENT_BIN_DESCRIPTION ladanyi@599: "Command line utilities") ladanyi@599: SET(CPACK_COMPONENT_HTML_DOCUMENTATION_DESCRIPTION ladanyi@599: "Doxygen generated documentation") alpar@225: ladanyi@599: SET(CPACK_COMPONENT_HEADERS_DEPENDS library) alpar@225: ladanyi@599: SET(CPACK_COMPONENT_HEADERS_GROUP "Development") ladanyi@599: SET(CPACK_COMPONENT_LIBRARY_GROUP "Development") ladanyi@599: SET(CPACK_COMPONENT_HTML_DOCUMENTATION_GROUP "Documentation") alpar@225: ladanyi@599: SET(CPACK_COMPONENT_GROUP_DEVELOPMENT_DESCRIPTION ladanyi@599: "Components needed to develop software using LEMON") ladanyi@599: SET(CPACK_COMPONENT_GROUP_DOCUMENTATION_DESCRIPTION ladanyi@599: "Documentation of LEMON") alpar@225: ladanyi@599: SET(CPACK_ALL_INSTALL_TYPES Full Developer) alpar@225: ladanyi@599: SET(CPACK_COMPONENT_HEADERS_INSTALL_TYPES Developer Full) ladanyi@599: SET(CPACK_COMPONENT_LIBRARY_INSTALL_TYPES Developer Full) ladanyi@599: SET(CPACK_COMPONENT_HTML_DOCUMENTATION_INSTALL_TYPES Full) alpar@225: ladanyi@599: SET(CPACK_GENERATOR "NSIS") ladanyi@599: SET(CPACK_NSIS_MUI_ICON "${PROJECT_SOURCE_DIR}/cmake/nsis/lemon.ico") ladanyi@599: SET(CPACK_NSIS_MUI_UNIICON "${PROJECT_SOURCE_DIR}/cmake/nsis/uninstall.ico") ladanyi@599: #SET(CPACK_PACKAGE_ICON "${PROJECT_SOURCE_DIR}/cmake/nsis\\\\installer.bmp") ladanyi@599: SET(CPACK_NSIS_INSTALLED_ICON_NAME "bin\\\\lemon.ico") ladanyi@599: SET(CPACK_NSIS_DISPLAY_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY} ${PROJECT_NAME}") ladanyi@599: SET(CPACK_NSIS_HELP_LINK "http:\\\\\\\\lemon.cs.elte.hu") ladanyi@599: SET(CPACK_NSIS_URL_INFO_ABOUT "http:\\\\\\\\lemon.cs.elte.hu") ladanyi@599: SET(CPACK_NSIS_CONTACT "lemon-user@lemon.cs.elte.hu") ladanyi@599: SET(CPACK_NSIS_CREATE_ICONS_EXTRA " ladanyi@599: CreateShortCut \\\"$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\Documentation.lnk\\\" \\\"$INSTDIR\\\\share\\\\doc\\\\index.html\\\" ladanyi@599: ") ladanyi@599: SET(CPACK_NSIS_DELETE_ICONS_EXTRA " ladanyi@599: !insertmacro MUI_STARTMENU_GETFOLDER Application $MUI_TEMP ladanyi@599: Delete \\\"$SMPROGRAMS\\\\$MUI_TEMP\\\\Documentation.lnk\\\" ladanyi@599: ") alpar@225: ladanyi@599: INCLUDE(CPack) ladanyi@599: ENDIF(WIN32) ladanyi@599: ENDIF(${CMAKE_SOURCE_DIR} STREQUAL ${PROJECT_SOURCE_DIR})