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