[vlmc-devel] commit: CMake: Fix debian package installation by using a nice version name , fix debian dependency. (Rohit Yadav )

git at videolan.org git at videolan.org
Sun Nov 28 10:50:50 CET 2010


vlmc | branch: master | Rohit Yadav <rohityadav89 at gmail.com> | Sun Nov 28 15:36:34 2010 +0530| [c4d2f6a9c8f23a57f26e0bfa97eafb03367555cc] | committer: Rohit Yadav 

CMake: Fix debian package installation by using a nice version name, fix debian dependency.
Use git patch string in package name only.

> http://git.videolan.org/gitweb.cgi/vlmc.git/?a=commit;h=c4d2f6a9c8f23a57f26e0bfa97eafb03367555cc
---

 CMakeLists.txt |   34 +++++++++++++---------------------
 1 files changed, 13 insertions(+), 21 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8204f75..a431908 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -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 )



More information about the Vlmc-devel mailing list