OwnCloudCPack.cmake 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. include( InstallRequiredSystemLibraries )
  2. set( CPACK_PACKAGE_CONTACT "Dominik Schmidt <domme@tomahawk-player.org>" )
  3. if ( EXISTS "${CMAKE_SOURCE_DIR}/OEM.cmake" )
  4. include ( "${CMAKE_SOURCE_DIR}/OEM.cmake" )
  5. else ()
  6. include ( "${CMAKE_SOURCE_DIR}/OWNCLOUD.cmake" )
  7. endif()
  8. include( VERSION.cmake )
  9. set( CPACK_PACKAGE_VERSION_MAJOR ${VERSION_MAJOR} )
  10. set( CPACK_PACKAGE_VERSION_MINOR ${VERSION_MINOR} )
  11. set( CPACK_PACKAGE_VERSION_PATCH ${VERSION_PATCH} )
  12. set( CPACK_PACKAGE_VERSION ${VERSION} )
  13. if(APPLE)
  14. set( CPACK_GENERATOR "DragNDrop" )
  15. set( CPACK_SOURCE_GENERATOR "")
  16. set( CPACK_PACKAGE_FILE_NAME ${APPLICATION_NAME}-${CPACK_PACKAGE_VERSION} )
  17. set( CPACK_PACKAGE_ICON ${CMAKE_BINARY_DIR}/src/ownCloud.icns)
  18. set( CPACK_DMG_DS_STORE "${CMAKE_SOURCE_DIR}/admin/osx/DS_Store.in")
  19. set( CPACK_DMG_BACKGROUND_IMAGE "${CMAKE_SOURCE_DIR}/admin/osx/DMGBackground.png" )
  20. set( CPACK_DMG_FORMAT "UDBZ" )
  21. set( CPACK_DMG_VOLUME_NAME "${APPLICATION_NAME}")
  22. # did not work with cmake 2.8.7, so we override MacOSXBundleInfo.plist.in
  23. #set( CPACK_BUNDLE_PLIST ${CMAKE_SOURCE_DIR}/admin/osx/Info.plist )
  24. # do we need these?
  25. #set( CPACK_SYSTEM_NAME "OSX" )
  26. #set( CPACK_PACKAGE_NAME "FOO" )
  27. #set( CPACK_BUNDLE_NAME "BAR" )
  28. endif()
  29. if(WIN32)
  30. set( CPACK_PACKAGE_FILE_NAME ${APPLICATION_SHORTNAME}-${CPACK_PACKAGE_VERSION}-setup )
  31. # Package file name without extension. Also a directory of installer cmake-2.5.0-Linux-i686
  32. # CPACK_GENERATOR CPack generator to be used STGZ;TGZ;TZ
  33. # CPACK_INCLUDE_TOPLEVEL_DIRECTORY Controls whether CPack adds a top-level directory, usually of the form ProjectName-Version-OS, to the top of package tree. 0 to disable, 1 to enable
  34. # CPACK_INSTALL_CMAKE_PROJECTS List of four values: Build directory, Project Name, Project Component, Directory in the package /home/andy/vtk/CMake-bin;CMake;ALL;/
  35. set( CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_SOURCE_DIR}/README.md" ) # File used as a description of a project /path/to/project/ReadMe.txt
  36. set( CPACK_PACKAGE_DESCRIPTION_SUMMARY "ownCloud Syncing Client" ) # Description summary of a project
  37. # CPACK_PACKAGE_EXECUTABLES List of pairs of executables and labels. Used by the NSIS generator to create Start Menu shortcuts. ccmake;CMake
  38. set( CPACK_PACKAGE_INSTALL_DIRECTORY ${APPLICATION_NAME} ) # Installation directory on the target system -> C:\Program Files\fellody
  39. set( CPACK_PACKAGE_INSTALL_REGISTRY_KEY ${APPLICATION_NAME} ) # Registry key used when installing this project CMake 2.5.0
  40. set( CPACK_PACKAGE_NAME ${APPLICATION_NAME} ) # Package name, defaults to the project name
  41. set( CPACK_PACKAGE_VENDOR "http://owncloud.com" ) # Package vendor name
  42. endif()
  43. # set( CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE.txt" ) # License file for the project, used by the STGZ, NSIS, and PackageMaker generators. /home/andy/vtk/CMake/Copyright.txt
  44. set( CPACK_TOPLEVEL_TAG "unused" ) # Directory for the installed files. - needed to provide anything to avoid an error# CPACK_INSTALL_COMMANDS Extra commands to install components.
  45. # Set the options file that needs to be included inside CMakeCPackOptions.cmake
  46. configure_file("${CMAKE_SOURCE_DIR}/CPackOptions.cmake.in"
  47. "${CMAKE_BINARY_DIR}/CPackOptions.cmake" @ONLY)
  48. set(CPACK_PROJECT_CONFIG_FILE "${CMAKE_BINARY_DIR}/CPackOptions.cmake") # File included at cpack time, once per generator after setting CPACK_GENERATOR to the actual generator being used; allows per-generator setting of CPACK_* variables at cpack time. ${PROJECT_BINARY_DIR}/CPackOptions.cmake
  49. include(CPack)