CMake subproject support fixes (#240)
authorAkos Ladanyi <ladanyi@tmit.bme.hu>
Thu, 19 Mar 2009 15:41:29 +0000
changeset 54156a86a363c12
parent 540 9d0d7e20f76d
child 543 e7eb04ece02c
child 544 6b9c1f6eb1e5
CMake subproject support fixes (#240)
CMakeLists.txt
     1.1 --- a/CMakeLists.txt	Thu Mar 19 08:40:34 2009 +0100
     1.2 +++ b/CMakeLists.txt	Thu Mar 19 15:41:29 2009 +0000
     1.3 @@ -45,69 +45,71 @@
     1.4    ADD_SUBDIRECTORY(test)
     1.5  ENDIF(${CMAKE_SOURCE_DIR} STREQUAL ${PROJECT_SOURCE_DIR})
     1.6  
     1.7 -IF(WIN32)
     1.8 -  SET(CPACK_PACKAGE_NAME ${PROJECT_NAME})
     1.9 -  SET(CPACK_PACKAGE_VENDOR "EGRES")
    1.10 -  SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY
    1.11 -    "LEMON - Library of Efficient Models and Optimization in Networks")
    1.12 -  SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE")
    1.13 +IF(${CMAKE_SOURCE_DIR} STREQUAL ${PROJECT_SOURCE_DIR})
    1.14 +  IF(WIN32)
    1.15 +    SET(CPACK_PACKAGE_NAME ${PROJECT_NAME})
    1.16 +    SET(CPACK_PACKAGE_VENDOR "EGRES")
    1.17 +    SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY
    1.18 +      "LEMON - Library of Efficient Models and Optimization in Networks")
    1.19 +    SET(CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/LICENSE")
    1.20  
    1.21 -  SET(CPACK_PACKAGE_VERSION ${PROJECT_VERSION})
    1.22 +    SET(CPACK_PACKAGE_VERSION ${PROJECT_VERSION})
    1.23  
    1.24 -  SET(CPACK_PACKAGE_INSTALL_DIRECTORY
    1.25 -    "${PROJECT_NAME} ${PROJECT_VERSION}")
    1.26 -  SET(CPACK_PACKAGE_INSTALL_REGISTRY_KEY
    1.27 -    "${PROJECT_NAME} ${PROJECT_VERSION}")
    1.28 +    SET(CPACK_PACKAGE_INSTALL_DIRECTORY
    1.29 +      "${PROJECT_NAME} ${PROJECT_VERSION}")
    1.30 +    SET(CPACK_PACKAGE_INSTALL_REGISTRY_KEY
    1.31 +      "${PROJECT_NAME} ${PROJECT_VERSION}")
    1.32  
    1.33 -  SET(CPACK_COMPONENTS_ALL headers library html_documentation bin)
    1.34 +    SET(CPACK_COMPONENTS_ALL headers library html_documentation bin)
    1.35  
    1.36 -  SET(CPACK_COMPONENT_HEADERS_DISPLAY_NAME "C++ headers")
    1.37 -  SET(CPACK_COMPONENT_LIBRARY_DISPLAY_NAME "Dynamic-link library")
    1.38 -  SET(CPACK_COMPONENT_BIN_DISPLAY_NAME "Command line utilities")
    1.39 -  SET(CPACK_COMPONENT_HTML_DOCUMENTATION_DISPLAY_NAME "HTML documentation")
    1.40 +    SET(CPACK_COMPONENT_HEADERS_DISPLAY_NAME "C++ headers")
    1.41 +    SET(CPACK_COMPONENT_LIBRARY_DISPLAY_NAME "Dynamic-link library")
    1.42 +    SET(CPACK_COMPONENT_BIN_DISPLAY_NAME "Command line utilities")
    1.43 +    SET(CPACK_COMPONENT_HTML_DOCUMENTATION_DISPLAY_NAME "HTML documentation")
    1.44  
    1.45 -  SET(CPACK_COMPONENT_HEADERS_DESCRIPTION
    1.46 -    "C++ header files")
    1.47 -  SET(CPACK_COMPONENT_LIBRARY_DESCRIPTION
    1.48 -    "DLL and import library")
    1.49 -  SET(CPACK_COMPONENT_BIN_DESCRIPTION
    1.50 -    "Command line utilities")
    1.51 -  SET(CPACK_COMPONENT_HTML_DOCUMENTATION_DESCRIPTION
    1.52 -    "Doxygen generated documentation")
    1.53 +    SET(CPACK_COMPONENT_HEADERS_DESCRIPTION
    1.54 +      "C++ header files")
    1.55 +    SET(CPACK_COMPONENT_LIBRARY_DESCRIPTION
    1.56 +      "DLL and import library")
    1.57 +    SET(CPACK_COMPONENT_BIN_DESCRIPTION
    1.58 +      "Command line utilities")
    1.59 +    SET(CPACK_COMPONENT_HTML_DOCUMENTATION_DESCRIPTION
    1.60 +      "Doxygen generated documentation")
    1.61  
    1.62 -  SET(CPACK_COMPONENT_HEADERS_DEPENDS library)
    1.63 +    SET(CPACK_COMPONENT_HEADERS_DEPENDS library)
    1.64  
    1.65 -  SET(CPACK_COMPONENT_HEADERS_GROUP "Development")
    1.66 -  SET(CPACK_COMPONENT_LIBRARY_GROUP "Development")
    1.67 -  SET(CPACK_COMPONENT_HTML_DOCUMENTATION_GROUP "Documentation")
    1.68 +    SET(CPACK_COMPONENT_HEADERS_GROUP "Development")
    1.69 +    SET(CPACK_COMPONENT_LIBRARY_GROUP "Development")
    1.70 +    SET(CPACK_COMPONENT_HTML_DOCUMENTATION_GROUP "Documentation")
    1.71  
    1.72 -  SET(CPACK_COMPONENT_GROUP_DEVELOPMENT_DESCRIPTION
    1.73 -    "Components needed to develop software using LEMON")
    1.74 -  SET(CPACK_COMPONENT_GROUP_DOCUMENTATION_DESCRIPTION
    1.75 -    "Documentation of LEMON")
    1.76 +    SET(CPACK_COMPONENT_GROUP_DEVELOPMENT_DESCRIPTION
    1.77 +      "Components needed to develop software using LEMON")
    1.78 +    SET(CPACK_COMPONENT_GROUP_DOCUMENTATION_DESCRIPTION
    1.79 +      "Documentation of LEMON")
    1.80  
    1.81 -  SET(CPACK_ALL_INSTALL_TYPES Full Developer)
    1.82 +    SET(CPACK_ALL_INSTALL_TYPES Full Developer)
    1.83  
    1.84 -  SET(CPACK_COMPONENT_HEADERS_INSTALL_TYPES Developer Full)
    1.85 -  SET(CPACK_COMPONENT_LIBRARY_INSTALL_TYPES Developer Full)
    1.86 -  SET(CPACK_COMPONENT_HTML_DOCUMENTATION_INSTALL_TYPES Full)
    1.87 +    SET(CPACK_COMPONENT_HEADERS_INSTALL_TYPES Developer Full)
    1.88 +    SET(CPACK_COMPONENT_LIBRARY_INSTALL_TYPES Developer Full)
    1.89 +    SET(CPACK_COMPONENT_HTML_DOCUMENTATION_INSTALL_TYPES Full)
    1.90  
    1.91 -  SET(CPACK_GENERATOR "NSIS")
    1.92 -  SET(CPACK_NSIS_MUI_ICON "${CMAKE_SOURCE_DIR}/cmake/nsis/lemon.ico")
    1.93 -  SET(CPACK_NSIS_MUI_UNIICON "${CMAKE_SOURCE_DIR}/cmake/nsis/uninstall.ico")
    1.94 -  #SET(CPACK_PACKAGE_ICON "${CMAKE_SOURCE_DIR}/cmake/nsis\\\\installer.bmp")
    1.95 -  SET(CPACK_NSIS_INSTALLED_ICON_NAME "bin\\\\lemon.ico")
    1.96 -  SET(CPACK_NSIS_DISPLAY_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY} ${PROJECT_NAME}")
    1.97 -  SET(CPACK_NSIS_HELP_LINK "http:\\\\\\\\lemon.cs.elte.hu")
    1.98 -  SET(CPACK_NSIS_URL_INFO_ABOUT "http:\\\\\\\\lemon.cs.elte.hu")
    1.99 -  SET(CPACK_NSIS_CONTACT "lemon-user@lemon.cs.elte.hu")
   1.100 -  SET(CPACK_NSIS_CREATE_ICONS_EXTRA "
   1.101 -    CreateShortCut \\\"$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\Documentation.lnk\\\" \\\"$INSTDIR\\\\share\\\\doc\\\\index.html\\\"
   1.102 -    ")
   1.103 -  SET(CPACK_NSIS_DELETE_ICONS_EXTRA "
   1.104 -    !insertmacro MUI_STARTMENU_GETFOLDER Application $MUI_TEMP
   1.105 -    Delete \\\"$SMPROGRAMS\\\\$MUI_TEMP\\\\Documentation.lnk\\\"
   1.106 -    ")
   1.107 +    SET(CPACK_GENERATOR "NSIS")
   1.108 +    SET(CPACK_NSIS_MUI_ICON "${PROJECT_SOURCE_DIR}/cmake/nsis/lemon.ico")
   1.109 +    SET(CPACK_NSIS_MUI_UNIICON "${PROJECT_SOURCE_DIR}/cmake/nsis/uninstall.ico")
   1.110 +    #SET(CPACK_PACKAGE_ICON "${PROJECT_SOURCE_DIR}/cmake/nsis\\\\installer.bmp")
   1.111 +    SET(CPACK_NSIS_INSTALLED_ICON_NAME "bin\\\\lemon.ico")
   1.112 +    SET(CPACK_NSIS_DISPLAY_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY} ${PROJECT_NAME}")
   1.113 +    SET(CPACK_NSIS_HELP_LINK "http:\\\\\\\\lemon.cs.elte.hu")
   1.114 +    SET(CPACK_NSIS_URL_INFO_ABOUT "http:\\\\\\\\lemon.cs.elte.hu")
   1.115 +    SET(CPACK_NSIS_CONTACT "lemon-user@lemon.cs.elte.hu")
   1.116 +    SET(CPACK_NSIS_CREATE_ICONS_EXTRA "
   1.117 +      CreateShortCut \\\"$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\Documentation.lnk\\\" \\\"$INSTDIR\\\\share\\\\doc\\\\index.html\\\"
   1.118 +      ")
   1.119 +    SET(CPACK_NSIS_DELETE_ICONS_EXTRA "
   1.120 +      !insertmacro MUI_STARTMENU_GETFOLDER Application $MUI_TEMP
   1.121 +      Delete \\\"$SMPROGRAMS\\\\$MUI_TEMP\\\\Documentation.lnk\\\"
   1.122 +      ")
   1.123  
   1.124 -  INCLUDE(CPack)
   1.125 -ENDIF(WIN32)
   1.126 +    INCLUDE(CPack)
   1.127 +  ENDIF(WIN32)
   1.128 +ENDIF(${CMAKE_SOURCE_DIR} STREQUAL ${PROJECT_SOURCE_DIR})