From fee5cceb47caac30f523b5f63374b0f38dbf52d5 Mon Sep 17 00:00:00 2001 From: Sandro Mani Date: Tue, 29 Nov 2022 08:28:49 +0100 Subject: [PATCH] Fix lib version take two --- CMakeLists.txt | 7 ++++--- qcustomplot.spec | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e7c8c16..db8406f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,11 +1,12 @@ cmake_minimum_required(VERSION 2.8) project(qcustomplot) -set(SO_VER "" CACHE STRING "SO version") +set(LIB_VER "" CACHE STRING "Library version") set(QT_VER "6" CACHE STRING "Target Qt version") -set(QCUSTOMPLOT_LIB_VERSION ${SO_VER}) -set(QCUSTOMPLOT_SO_VERSION ${SO_VER}) +set(QCUSTOMPLOT_LIB_VERSION ${LIB_VER}) +string(REPLACE "." ";" VERSION_LIST ${LIB_VER}) +list(GET VERSION_LIST 0 QCUSTOMPLOT_SO_VERSION) FIND_PACKAGE(Qt${QT_VER}Core REQUIRED) FIND_PACKAGE(Qt${QT_VER}Gui REQUIRED) diff --git a/qcustomplot.spec b/qcustomplot.spec index e64f6b0..bbdea16 100644 --- a/qcustomplot.spec +++ b/qcustomplot.spec @@ -1,7 +1,7 @@ # Bump this as appropriate when doing release updates, check i.e. with abi_compliance_checker # First digit: major, bump when incompatible changes were performed # Second digit: minor, bump when interface was extended -%global so_ver 2.0.0 +%global lib_ver 2.0.0 #global pre beta Name: qcustomplot @@ -90,11 +90,11 @@ cp -a %{SOURCE1} . %build %define _vpath_builddir %{_target_platform}-qt5 -%cmake -DQT_VER=5 -DSO_VER=%{so_ver} +%cmake -DQT_VER=5 -DLIB_VER=%{lib_ver} %cmake_build %define _vpath_builddir %{_target_platform}-qt6 -%cmake -DQT_VER=6 -DSO_VER=%{so_ver} +%cmake -DQT_VER=6 -DLIB_VER=%{lib_ver} %cmake_build @@ -150,6 +150,7 @@ done %changelog * Tue Nov 29 2022 Sandro Mani - 2.1.1-4 - Set CMAKE_AUTOMOC to ON +- Fix lib version take two * Mon Nov 28 2022 Sandro Mani - 2.1.1-3 - Fix lib version