Commit e2e8f156 authored by Rohit Yadav's avatar Rohit Yadav

CMakeLists.txt: Adds git rev as patch version, also appends in packages

and adds processor name too (unix/deb/rpm only). Adds rpm pkg dependency,
which is common to deb pkg too. Fixes typos and variables further used in config.h.
This should satisfy the git rev version as requested on irc.

vlmc.ico: Modified icon for windows; icon has multiple resolution
icons embedded: 256x256, 128x128, 64x64, 32x32, 16x16.
This fixes any resolution problem (viz #109) on any Windows version.
parent 525c51f1
......@@ -4,7 +4,7 @@
# Ludovic Fauvet <etix@vlmc.org>
#
#Project Info
# Project Info
SET(PROJECT_NAME_SHORT "VLMC")
SET(PROJECT_NAME_LONG "VideoLAN Movie Creator")
SET(PROJECT_DESCRIPTION "VLMC (VideoLAN Movie Creator) is a cross-platform, non-linear video editing software based on the VLC Media Player.")
......@@ -13,22 +13,36 @@ SET(PROJECT_CONTACT "vlmc-devel@videolan.org")
SET(PROJECT_VENDOR "VLMC Team")
SET(ORG_WEBSITE "videolan.org")
STRING(TOLOWER ${PROJECT_NAME_SHORT} PROJECT_NAME_SHORT_LOWER)
PROJECT(${PROJECT_NAME_SHORT_LOWER}-${PROJECT_VERSION})
# version: 0.2.0
# Find Git Version Patch
FIND_PROGRAM(GIT git)
IF(GIT)
EXECUTE_PROCESS(
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
COMMAND ${GIT} rev-parse --short HEAD
OUTPUT_VARIABLE GIT_OUT OUTPUT_STRIP_TRAILING_WHITESPACE
)
SET(PROJECT_VERSION_PATCH "${GIT_OUT}git")
MESSAGE(STATUS "Git Version Patch: git_${GIT_OUT}")
ELSE(GIT)
SET(GIT_OUT 0)
ENDIF(GIT)
# version: 0.2.x
SET(CPACK_PACKAGE_VERSION_MAJOR "0")
SET(CPACK_PACKAGE_VERSION_MINOR "2")
SET(CPACK_PACKAGE_VERSION_PATCH "0")
SET(COMPLETE_VERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH})
SET(PROJECT_VERSION ${COMPLETE_VERSION})
SET(CPACK_PACKAGE_VERSION_PATCH ${PROJECT_VERSION_PATCH})
SET(CPACK_PACKAGE_VERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH})
SET(PROJECT_VERSION ${CPACK_PACKAGE_VERSION})
STRING(TOLOWER ${PROJECT_NAME_SHORT} PROJECT_NAME_SHORT_LOWER)
PROJECT(${PROJECT_NAME_SHORT_LOWER}-${PROJECT_VERSION})
# Codename of the Project :-)
SET(CODENAME "alpha")
# System Information
SITE_NAME(HOSTNAME)
SET(SYSNAME ${CMAKE_SYSTEM})
SET(SYSNAME ${CMAKE_SYSTEM}-${CMAKE_SYSTEM_PROCESSOR})
# CMake Settings
CMAKE_MINIMUM_REQUIRED(VERSION 2.6.0)
......@@ -79,7 +93,7 @@ ELSE(NOT APPLE)
SET(WITH_CRASHHANDLER_GUI FALSE CACHE BOOL "Disable crash handler gui...")
SET(WITH_CRASHHANDLER False CACHE BOOL "Disable the crash handler")
SET(CMAKE_BUILD_TYPE "Release")
SET(CMAKE_OSX_ARCHITECTURES i386) # Make a universal binary
SET(CMAKE_OSX_ARCHITECTURES i386)
# SET(CMAKE_INSTALL_PREFIX "${CMAKE_CURRENT_BINARY_DIR}")
ENDIF(NOT APPLE)
......@@ -205,23 +219,25 @@ INSTALL (DIRECTORY share/ DESTINATION ${VLMC_DATA_DIR}
PATTERN "vlmc.png" EXCLUDE)
#############################################################
# Enable packaging
# Package Settings
INCLUDE(InstallRequiredSystemLibraries)
SET(CPACK_SYSTEM_NAME ${CMAKE_SYSTEM_NAME})
SET(CPACK_PACKAGE_NAME ${PROJECT_NAME_SHORT})
SET(CPACK_PACKAGE_VERSION ${PROJECT_VERSION})
# Force package name
SET(CPACK_PACKAGE_FILE_NAME ${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${CPACK_SYSTEM_NAME})
SET(CPACK_PACKAGE_DESCRIPTION ${PROJECT_NAME_LONG})
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${PROJECT_NAME_SHORT} \n ${PROJECT_DESCRIPTION}")
SET(CPACK_PACKAGE_VENDOR ${PROJECT_VENDOR})
SET(CPACK_PACKAGE_CONTACT ${PROJECT_CONTACT})
SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README")
SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/COPYING")
SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_SOURCE_DIR}/README")
SET(CPACK_RESOURCE_FILE_README ${CMAKE_SOURCE_DIR}/README)
SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/COPYING")
SET(CPACK_PACKAGE_INSTALL_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
# Force Package Name
SET(CPACK_PACKAGE_FILE_NAME ${PROJECT_NAME}-${CPACK_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR})
# NSIS Windows Installer
IF(WIN32 AND NOT UNIX)
# There is a bug in NSI that does not handle full unix paths properly. Make
# sure there is at least one set of four (4) backslashes.
......@@ -232,29 +248,31 @@ IF(WIN32 AND NOT UNIX)
SET(CPACK_NSIS_URL_INFO_ABOUT "http:\\\\\\\\vlmc.org")
SET(CPACK_NSIS_CONTACT ${PROJECT_CONTACT})
SET(CPACK_NSIS_MODIFY_PATH ON)
#SET(CPACK_NSIS_EXTRA_INSTALL_COMMANDS " !include \\\"${CMAKE_SOURCE_DIR}\\\\win_build\\\\extra.nsh\\\"")
ELSE(WIN32 AND NOT UNIX)
#SET(CPACK_STRIP_FILES "VLMC")
#SET(CPACK_SOURCE_STRIP_FILES "")
ENDIF(WIN32 AND NOT UNIX)
# TODO: Check stuff: libvlc2 etc. in future as VLC 1.1+ releases
SET(PACKAGE_REQUIRES "libqt4-gui ( >= 4.6 ), libqt4-network ( >= 4.6 ), libqt4-svg ( >= 4.6 ), libqt4-xml ( >= 4.6 ), frei0r-plugins-dev")
# RPM packages
INCLUDE ( ${CMAKE_MODULE_PATH}/RpmBuild.cmake )
IF ( RPMBUILD_FOUND )
IF ( RPMBUILD_FOUND AND NOT WIN32 )
SET(CPACK_GENERATOR "RPM")
SET(CPACK_SET_DESTDIR TRUE)
ENDIF ( RPMBUILD_FOUND )
SET(CPACK_RPM_PACKAGE_REQUIRES ${PACKAGE_REQUIRES})
ENDIF ( RPMBUILD_FOUND AND NOT WIN32 )
# Debian packages
INCLUDE ( ${CMAKE_MODULE_PATH}/DpkgBuild.cmake )
IF ( DPKG_FOUND )
IF ( DPKG_FOUND AND NOT WIN32 )
SET(CPACK_GENERATOR "DEB")
SET(CPACK_SET_DESTDIR TRUE)
# FIXME: Check stuff: libvlc2 etc. in future as VLC 1.1+ releases
SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libqt4-gui ( >= 4.6 ), libqt4-network ( >= 4.6 ), libqt4-svg ( >= 4.6 ), libqt4-xml ( >= 4.6 ), frei0r-plugins-dev")
ENDIF ( DPKG_FOUND )
SET(CPACK_DEBIAN_PACKAGE_DEPENDS ${PACKAGE_REQUIRES})
ENDIF ( DPKG_FOUND AND NOT WIN32 )
#Mac
# Mac Bundle
IF( APPLE )
SET(CPACK_GENERATOR "DragNDrop")
......
......@@ -4,7 +4,7 @@
#
# Output file name
SET(NSIS_OUTPUT_FILE "${PROJECT_NAME}${PROJECT_VERSION}.exe")
SET(NSIS_OUTPUT_FILE "${PROJECT_NAME}.exe")
# NSIS is only available for Win32 builds (native or cross compilation)
IF(WIN32)
......
share/vlmc.ico

66.1 KB | W: | H:

share/vlmc.ico

345 KB | W: | H:

share/vlmc.ico
share/vlmc.ico
share/vlmc.ico
share/vlmc.ico
  • 2-up
  • Swipe
  • Onion skin
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