]> granicus.if.org Git - taglib/commitdiff
Skip the patch version if it's 0
authorLukáš Lalinský <lukas@oxygene.sk>
Tue, 25 Aug 2015 15:04:34 +0000 (17:04 +0200)
committerLukáš Lalinský <lukas@oxygene.sk>
Tue, 25 Aug 2015 15:04:34 +0000 (17:04 +0200)
CMakeLists.txt
bindings/c/taglib_c.pc.cmake
taglib-config.cmake
taglib.pc.cmake

index 4bde0d0af869f8e87dc4a2a2fc8a6c87350fbf09..dbd2fcd3af6117412c391e44b12258371097c095 100644 (file)
@@ -56,7 +56,11 @@ set(TAGLIB_LIB_MAJOR_VERSION "1")
 set(TAGLIB_LIB_MINOR_VERSION "10")
 set(TAGLIB_LIB_PATCH_VERSION "0")
 
-set(TAGLIB_LIB_VERSION_STRING "${TAGLIB_LIB_MAJOR_VERSION}.${TAGLIB_LIB_MINOR_VERSION}.${TAGLIB_LIB_PATCH_VERSION}")
+if("${TAGLIB_LIB_PATCH_VERSION}" EQUAL "0")
+  set(TAGLIB_LIB_VERSION_STRING "${TAGLIB_LIB_MAJOR_VERSION}.${TAGLIB_LIB_MINOR_VERSION}")
+else()
+  set(TAGLIB_LIB_VERSION_STRING "${TAGLIB_LIB_MAJOR_VERSION}.${TAGLIB_LIB_MINOR_VERSION}.${TAGLIB_LIB_PATCH_VERSION}")
+endif()
 
 # 1. If the library source code has changed at all since the last update, then increment revision.
 # 2. If any interfaces have been added, removed, or changed since the last update, increment current, and set revision to 0.
@@ -130,4 +134,4 @@ configure_file(
 if (NOT TARGET uninstall)
   add_custom_target(uninstall
   COMMAND "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake")
-endif()
\ No newline at end of file
+endif()
index 61764fc323e117b853e6d2a7c5c195855bf75818..232f4f784aa86090b0a9d11a0ef33ce6779aba5d 100644 (file)
@@ -7,6 +7,6 @@ includedir=${INCLUDE_INSTALL_DIR}
 Name: TagLib C Bindings
 Description: Audio meta-data library (C bindings)
 Requires: taglib
-Version: ${TAGLIB_LIB_MAJOR_VERSION}.${TAGLIB_LIB_MINOR_VERSION}.${TAGLIB_LIB_PATCH_VERSION}
+Version: ${TAGLIB_LIB_VERSION_STRING}
 Libs: -L${LIB_INSTALL_DIR} -ltag_c
 Cflags: -I${INCLUDE_INSTALL_DIR}/taglib 
index 2c2d2dbc49f1c569bb0de06e1ffb4cc13b29978b..2bc2811a14ac8b20c0bba55f86bc4e0ede803c51 100644 (file)
@@ -35,7 +35,7 @@ do
          flags="$flags -I$includedir/taglib"
          ;;
     --version)
-         echo ${TAGLIB_LIB_MAJOR_VERSION}.${TAGLIB_LIB_MINOR_VERSION}.${TAGLIB_LIB_PATCH_VERSION} 
+         echo ${TAGLIB_LIB_VERSION_STRING}
          ;;
     --prefix)
          echo $prefix
index 909b8fcfc50f79d00a9be295d254d2345de8f0ef..5ee50aa51849f6c846895ec56b67bc12edc9eb7d 100644 (file)
@@ -6,6 +6,6 @@ includedir=${INCLUDE_INSTALL_DIR}
 Name: TagLib
 Description: Audio meta-data library
 Requires: 
-Version: ${TAGLIB_LIB_MAJOR_VERSION}.${TAGLIB_LIB_MINOR_VERSION}.${TAGLIB_LIB_PATCH_VERSION}
+Version: ${TAGLIB_LIB_VERSION_STRING}
 Libs: -L${LIB_INSTALL_DIR} -ltag
 Cflags: -I${INCLUDE_INSTALL_DIR}/taglib