From 29ed26528107f996c8b19d6184b55a516ffdb862 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Luk=C3=A1=C5=A1=20Lalinsk=C3=BD?= Date: Tue, 25 Aug 2015 17:04:34 +0200 Subject: [PATCH] Skip the patch version if it's 0 --- CMakeLists.txt | 8 ++++++-- bindings/c/taglib_c.pc.cmake | 2 +- taglib-config.cmake | 2 +- taglib.pc.cmake | 2 +- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4bde0d0a..dbd2fcd3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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() diff --git a/bindings/c/taglib_c.pc.cmake b/bindings/c/taglib_c.pc.cmake index 61764fc3..232f4f78 100644 --- a/bindings/c/taglib_c.pc.cmake +++ b/bindings/c/taglib_c.pc.cmake @@ -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 diff --git a/taglib-config.cmake b/taglib-config.cmake index 2c2d2dbc..2bc2811a 100644 --- a/taglib-config.cmake +++ b/taglib-config.cmake @@ -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 diff --git a/taglib.pc.cmake b/taglib.pc.cmake index 909b8fcf..5ee50aa5 100644 --- a/taglib.pc.cmake +++ b/taglib.pc.cmake @@ -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 -- 2.40.0