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@538: 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@612: FIND_PACKAGE(CPLEX) ladanyi@613: FIND_PACKAGE(COIN) ladanyi@473: alpar@496: INCLUDE(CheckTypeSize) ladanyi@621: CHECK_TYPE_SIZE("long long" LEMON_LONG_LONG) alpar@496: alpar@225: ENABLE_TESTING() alpar@225: alpar@225: ADD_SUBDIRECTORY(lemon) ladanyi@538: IF(${CMAKE_SOURCE_DIR} STREQUAL ${PROJECT_SOURCE_DIR}) ladanyi@538: ADD_SUBDIRECTORY(demo) ladanyi@538: ADD_SUBDIRECTORY(tools) ladanyi@538: ADD_SUBDIRECTORY(doc) ladanyi@538: ADD_SUBDIRECTORY(test) ladanyi@538: ENDIF(${CMAKE_SOURCE_DIR} STREQUAL ${PROJECT_SOURCE_DIR}) alpar@225: ladanyi@677: CONFIGURE_FILE( ladanyi@677: ${PROJECT_SOURCE_DIR}/cmake/LEMONConfig.cmake.in ladanyi@677: ${PROJECT_BINARY_DIR}/cmake/LEMONConfig.cmake ladanyi@677: @ONLY ladanyi@677: ) ladanyi@677: IF(UNIX) ladanyi@677: INSTALL( ladanyi@677: FILES ${PROJECT_BINARY_DIR}/cmake/LEMONConfig.cmake ladanyi@677: DESTINATION share/lemon/cmake ladanyi@677: ) ladanyi@677: ELSEIF(WIN32) ladanyi@677: INSTALL( ladanyi@677: FILES ${PROJECT_BINARY_DIR}/cmake/LEMONConfig.cmake ladanyi@677: DESTINATION cmake ladanyi@677: ) ladanyi@677: ENDIF(UNIX) ladanyi@677: ladanyi@541: IF(${CMAKE_SOURCE_DIR} STREQUAL ${PROJECT_SOURCE_DIR}) ladanyi@541: IF(WIN32) ladanyi@541: SET(CPACK_PACKAGE_NAME ${PROJECT_NAME}) ladanyi@541: SET(CPACK_PACKAGE_VENDOR "EGRES") ladanyi@541: SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY kpeter@656: "LEMON - Library for Efficient Modeling and Optimization in Networks") ladanyi@541: SET(CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/LICENSE") alpar@225: ladanyi@541: SET(CPACK_PACKAGE_VERSION ${PROJECT_VERSION}) alpar@225: ladanyi@541: SET(CPACK_PACKAGE_INSTALL_DIRECTORY ladanyi@541: "${PROJECT_NAME} ${PROJECT_VERSION}") ladanyi@541: SET(CPACK_PACKAGE_INSTALL_REGISTRY_KEY ladanyi@541: "${PROJECT_NAME} ${PROJECT_VERSION}") alpar@225: ladanyi@541: SET(CPACK_COMPONENTS_ALL headers library html_documentation bin) alpar@225: ladanyi@541: SET(CPACK_COMPONENT_HEADERS_DISPLAY_NAME "C++ headers") ladanyi@541: SET(CPACK_COMPONENT_LIBRARY_DISPLAY_NAME "Dynamic-link library") ladanyi@541: SET(CPACK_COMPONENT_BIN_DISPLAY_NAME "Command line utilities") ladanyi@541: SET(CPACK_COMPONENT_HTML_DOCUMENTATION_DISPLAY_NAME "HTML documentation") alpar@225: ladanyi@541: SET(CPACK_COMPONENT_HEADERS_DESCRIPTION ladanyi@541: "C++ header files") ladanyi@541: SET(CPACK_COMPONENT_LIBRARY_DESCRIPTION ladanyi@541: "DLL and import library") ladanyi@541: SET(CPACK_COMPONENT_BIN_DESCRIPTION ladanyi@541: "Command line utilities") ladanyi@541: SET(CPACK_COMPONENT_HTML_DOCUMENTATION_DESCRIPTION ladanyi@541: "Doxygen generated documentation") alpar@225: ladanyi@541: SET(CPACK_COMPONENT_HEADERS_DEPENDS library) alpar@225: ladanyi@541: SET(CPACK_COMPONENT_HEADERS_GROUP "Development") ladanyi@541: SET(CPACK_COMPONENT_LIBRARY_GROUP "Development") ladanyi@541: SET(CPACK_COMPONENT_HTML_DOCUMENTATION_GROUP "Documentation") alpar@225: ladanyi@541: SET(CPACK_COMPONENT_GROUP_DEVELOPMENT_DESCRIPTION ladanyi@541: "Components needed to develop software using LEMON") ladanyi@541: SET(CPACK_COMPONENT_GROUP_DOCUMENTATION_DESCRIPTION ladanyi@541: "Documentation of LEMON") alpar@225: ladanyi@541: SET(CPACK_ALL_INSTALL_TYPES Full Developer) alpar@225: ladanyi@541: SET(CPACK_COMPONENT_HEADERS_INSTALL_TYPES Developer Full) ladanyi@541: SET(CPACK_COMPONENT_LIBRARY_INSTALL_TYPES Developer Full) ladanyi@541: SET(CPACK_COMPONENT_HTML_DOCUMENTATION_INSTALL_TYPES Full) alpar@225: ladanyi@541: SET(CPACK_GENERATOR "NSIS") ladanyi@541: SET(CPACK_NSIS_MUI_ICON "${PROJECT_SOURCE_DIR}/cmake/nsis/lemon.ico") ladanyi@541: SET(CPACK_NSIS_MUI_UNIICON "${PROJECT_SOURCE_DIR}/cmake/nsis/uninstall.ico") ladanyi@541: #SET(CPACK_PACKAGE_ICON "${PROJECT_SOURCE_DIR}/cmake/nsis\\\\installer.bmp") ladanyi@541: SET(CPACK_NSIS_INSTALLED_ICON_NAME "bin\\\\lemon.ico") ladanyi@541: SET(CPACK_NSIS_DISPLAY_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY} ${PROJECT_NAME}") ladanyi@541: SET(CPACK_NSIS_HELP_LINK "http:\\\\\\\\lemon.cs.elte.hu") ladanyi@541: SET(CPACK_NSIS_URL_INFO_ABOUT "http:\\\\\\\\lemon.cs.elte.hu") ladanyi@541: SET(CPACK_NSIS_CONTACT "lemon-user@lemon.cs.elte.hu") ladanyi@541: SET(CPACK_NSIS_CREATE_ICONS_EXTRA " ladanyi@541: CreateShortCut \\\"$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\Documentation.lnk\\\" \\\"$INSTDIR\\\\share\\\\doc\\\\index.html\\\" ladanyi@541: ") ladanyi@541: SET(CPACK_NSIS_DELETE_ICONS_EXTRA " ladanyi@541: !insertmacro MUI_STARTMENU_GETFOLDER Application $MUI_TEMP ladanyi@541: Delete \\\"$SMPROGRAMS\\\\$MUI_TEMP\\\\Documentation.lnk\\\" ladanyi@541: ") alpar@225: ladanyi@541: INCLUDE(CPack) ladanyi@541: ENDIF(WIN32) ladanyi@541: ENDIF(${CMAKE_SOURCE_DIR} STREQUAL ${PROJECT_SOURCE_DIR})