Commit dfb52d9e authored by Pierre d'Herbemont's avatar Pierre d'Herbemont
Browse files

cmake: Use CPack to create the package. (Use `make package` or `cpack`)....

cmake: Use CPack to create the package. (Use `make package` or `cpack`). Should produce a tgz/tar.gz/rpm/dmg/nsis. This probably need some tuning.
parent f295d625
......@@ -28,3 +28,22 @@ add_subdirectory(src)
add_subdirectory(modules)
add_subdirectory(po)
# Enable CPack: Automatic package creation
set(README "${CMAKE_CURRENT_SOURCE_DIR}/README")
set(LICENCE "${CMAKE_CURRENT_SOURCE_DIR}/COPYING")
if(APPLE)
set(README "${CMAKE_CURRENT_SOURCE_DIR}/extras/package/macosx/README.MacOSX.rtf")
set(LICENCE "") # FIXME: Mac OS X's Package Maker doesn't allow non .*
endif(APPLE)
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "VLC Media Player")
set(CPACK_PACKAGE_VENDOR "VideoLAN Team")
set(CPACK_PACKAGE_DESCRIPTION_FILE ${README})
set(CPACK_RESOURCE_FILE_LICENSE ${LICENCE})
set(CPACK_PACKAGE_VERSION_MAJOR "${VLC_VERSION_MAJOR}")
set(CPACK_PACKAGE_VERSION_MINOR "${VLC_VERSION_MINOR}")
set(CPACK_PACKAGE_VERSION_PATCH "${VLC_VERSION_PATCH}${VLC_VERSION_EXTRA}")
include(CPack)
......@@ -11,6 +11,21 @@ include( ${CMAKE_SOURCE_DIR}/cmake/vlc_add_compile_flag.cmake )
include( ${CMAKE_SOURCE_DIR}/cmake/vlc_check_type.cmake )
include( ${CMAKE_SOURCE_DIR}/cmake/pkg_check_modules.cmake )
###########################################################
# VERSION
###########################################################
set(VLC_VERSION_MAJOR 0)
set(VLC_VERSION_MINOR 9)
set(VLC_VERSION_PATCH 0)
set(VLC_VERSION_EXTRA "-svn")
set(PACKAGE "vlc")
set(PACKAGE_STRING "vlc")
set(VERSION_MESSAGE "vlc-${VLC_VERSION_MAJOR}.${VLC_VERSION_MINOR}.${VLC_VERSION_PATCH}${VLC_VERSION_EXTRA}")
set(COPYRIGHT_MESSAGE "Copyright © the VideoLAN team")
set(COPYRIGHT_YEARS "2001-2008")
###########################################################
# Options
###########################################################
......@@ -187,7 +202,7 @@ if(APPLE)
endif(APPLE)
###########################################################
# version and info setup
# info
###########################################################
macro(command_to_configvar command var)
......@@ -206,11 +221,6 @@ command_to_configvar( "${CMAKE_C_COMPILER} --version" VLC_COMPILER )
command_to_configvar( "${CMAKE_C_COMPILER} --version" CONFIGURE_LINE )
set( VLC_COMPILER "${CMAKE_C_COMPILER}" )
set(PACKAGE "vlc")
set(PACKAGE_STRING "vlc")
set(VERSION_MESSAGE "vlc-0.9.0-svn")
set(COPYRIGHT_MESSAGE "Copyright © the VideoLAN team")
set(COPYRIGHT_YEARS "2001-2008")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment