lemon-project-template-glpk

diff CMakeLists.txt @ 0:368136e07d23

LEMON project template
author Alpar Juttner <alpar@cs.elte.hu>
date Tue, 26 May 2009 16:18:51 +0100
parents
children 4721c71fdbfc
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/CMakeLists.txt	Tue May 26 16:18:51 2009 +0100
     1.3 @@ -0,0 +1,88 @@
     1.4 +CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
     1.5 +
     1.6 +SET(PROJECT_NAME "LEMON-PROJECT-TEMPLATE")
     1.7 +SET(PROJECT_VERSION "hg-tip"
     1.8 +                    CACHE STRING "LEMON PROJECT TEMPLATE version string.")
     1.9 +
    1.10 +PROJECT(${PROJECT_NAME})
    1.11 +
    1.12 +SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
    1.13 +
    1.14 +FIND_PACKAGE(LEMON REQUIRED)
    1.15 +FIND_PACKAGE(Doxygen)
    1.16 +
    1.17 +INCLUDE_DIRECTORIES(
    1.18 +  ${PROJECT_SOURCE_DIR}
    1.19 +  ${PROJECT_BINARY_DIR}
    1.20 +  ${LEMON_INCLUDE_DIRS}
    1.21 +)
    1.22 +
    1.23 +LINK_DIRECTORIES(${PROJECT_BINARY_DIR}/lemon)
    1.24 +
    1.25 +ADD_EXECUTABLE(lemon-project main.cc)
    1.26 +TARGET_LINK_LIBRARIES(lemon-project ${LEMON_LIBRARIES})
    1.27 +INSTALL(
    1.28 +  TARGETS lemon-project
    1.29 +  RUNTIME DESTINATION bin
    1.30 +  COMPONENT bin
    1.31 +)
    1.32 +
    1.33 +# IF(MSVC)
    1.34 +#   SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4250 /wd4355 /wd4503 /wd4800 /wd4996")
    1.35 +# # Suppressed warnings:
    1.36 +# # C4250: 'class1' : inherits 'class2::member' via dominance
    1.37 +# # C4355: 'this' : used in base member initializer list
    1.38 +# # C4503: 'function' : decorated name length exceeded, name was truncated
    1.39 +# # C4800: 'type' : forcing value to bool 'true' or 'false' (performance warning)
    1.40 +# # C4996: 'function': was declared deprecated
    1.41 +# ENDIF(MSVC)
    1.42 +
    1.43 +ENABLE_TESTING()
    1.44 +
    1.45 +ADD_SUBDIRECTORY(doc)
    1.46 +
    1.47 +######################################################################
    1.48 +# CPACK configuration 
    1.49 +######################################################################
    1.50 +
    1.51 +IF(${CMAKE_SOURCE_DIR} STREQUAL ${PROJECT_SOURCE_DIR})
    1.52 +  SET(CPACK_PACKAGE_NAME ${PROJECT_NAME})
    1.53 +  SET(CPACK_PACKAGE_VENDOR "EGRES")
    1.54 +  SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY
    1.55 +      "LEMON PROJECT TEMPLATE - A Template Build Environment for LEMON")
    1.56 +  SET(CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/LICENSE")
    1.57 +
    1.58 +  SET(CPACK_PACKAGE_VERSION ${PROJECT_VERSION})
    1.59 +
    1.60 +  SET(CPACK_PACKAGE_INSTALL_DIRECTORY
    1.61 +      "${PROJECT_NAME}")
    1.62 +  SET(CPACK_PACKAGE_INSTALL_REGISTRY_KEY
    1.63 +      "${PROJECT_NAME}")
    1.64 +
    1.65 +  SET(CPACK_COMPONENTS_ALL
    1.66 +      html_documentation
    1.67 +      bin)
    1.68 +
    1.69 +  SET(CPACK_COMPONENT_BIN_DISPLAY_NAME "Command line utilities")
    1.70 +  SET(CPACK_COMPONENT_HTML_DOCUMENTATION_DISPLAY_NAME "HTML documentation")
    1.71 +
    1.72 +  SET(CPACK_COMPONENT_BIN_DESCRIPTION
    1.73 +      "Command line utilities")
    1.74 +  SET(CPACK_COMPONENT_HTML_DOCUMENTATION_DESCRIPTION
    1.75 +      "Doxygen generated documentation")
    1.76 +
    1.77 +  SET(CPACK_GENERATOR "NSIS")
    1.78 +  SET(CPACK_NSIS_DISPLAY_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY} ${PROJECT_NAME}")
    1.79 +  SET(CPACK_NSIS_HELP_LINK "http:\\\\\\\\lemon.cs.elte.hu")
    1.80 +  SET(CPACK_NSIS_URL_INFO_ABOUT "http:\\\\\\\\lemon.cs.elte.hu")
    1.81 +  SET(CPACK_NSIS_CONTACT "lemon-user@lemon.cs.elte.hu")
    1.82 +  SET(CPACK_NSIS_CREATE_ICONS_EXTRA "
    1.83 +      CreateShortCut \\\"$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\Documentation.lnk\\\" \\\"$INSTDIR\\\\share\\\\doc\\\\index.html\\\"
    1.84 +      ")
    1.85 +  SET(CPACK_NSIS_DELETE_ICONS_EXTRA "
    1.86 +      !insertmacro MUI_STARTMENU_GETFOLDER Application $MUI_TEMP
    1.87 +      Delete \\\"$SMPROGRAMS\\\\$MUI_TEMP\\\\Documentation.lnk\\\"
    1.88 +      ")
    1.89 +
    1.90 +  INCLUDE(CPack)
    1.91 +ENDIF(${CMAKE_SOURCE_DIR} STREQUAL ${PROJECT_SOURCE_DIR})