Commit c4d2f6a9 authored by Rohit Yadav's avatar Rohit Yadav

CMake: Fix debian package installation by using a nice version name, fix debian dependency.

Use git patch string in package name only.
parent 1fc3fa98
......@@ -31,29 +31,21 @@ IF(WIN32)
ADD_DEFINITIONS( -D__USE_MINGW_ANSI_STDIO=1 )
ENDIF(WIN32)
IF("${CMAKE_BUILD_TYPE}" STREQUAL "Release")
SET(PATCH_OUT "0")
ELSE("${CMAKE_BUILD_TYPE}" STREQUAL "Release")
# 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(PATCH_OUT "0_git${GIT_OUT}")
ELSE(GIT)
SET(PATCH_OUT "0")
ENDIF(GIT)
ENDIF("${CMAKE_BUILD_TYPE}" STREQUAL "Release")
SET(PROJECT_VERSION_PATCH ${PATCH_OUT})
# 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(GIT_PATCH "git${GIT_OUT}")
ENDIF(GIT)
# version: 0.2.x
SET(CPACK_PACKAGE_VERSION_MAJOR "0")
SET(CPACK_PACKAGE_VERSION_MINOR "2")
SET(CPACK_PACKAGE_VERSION_PATCH ${PROJECT_VERSION_PATCH})
SET(CPACK_PACKAGE_VERSION_PATCH "0")
SET(CPACK_PACKAGE_VERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH})
SET(PROJECT_VERSION_MAJOR ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR})
SET(PROJECT_VERSION ${CPACK_PACKAGE_VERSION})
......@@ -249,7 +241,7 @@ 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})
SET(CPACK_PACKAGE_FILE_NAME ${PROJECT_NAME}${GIT_PATCH}-${CPACK_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR})
# NSIS Windows Installer
IF(WIN32 AND NOT UNIX)
......@@ -267,7 +259,7 @@ ELSE(WIN32 AND NOT UNIX)
#SET(CPACK_SOURCE_STRIP_FILES "")
ENDIF(WIN32 AND NOT UNIX)
SET(PACKAGE_REQUIRES "libvlc-dev ( >= 1.1.4 ), frei0r-plugins-dev, libqt4-gui ( >= 4.6 ), libqt4-network ( >= 4.6 ), libqt4-svg ( >= 4.6 ), libqt4-xml ( >= 4.6 )")
SET(PACKAGE_REQUIRES "libvlc-dev ( >= 1.1.4 ), frei0r-plugins, libqt4-gui ( >= 4.6 ), libqt4-network ( >= 4.6 ), libqt4-svg ( >= 4.6 ), libqt4-xml ( >= 4.6 )")
# RPM packages
INCLUDE ( ${CMAKE_MODULE_PATH}/RpmBuild.cmake )
......
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