From: Leopold Palomo-Avellaneda <leo@alaxarxa.net>
Date: Mon, 29 Oct 2018 15:53:33 +0100
Subject: Adding Qt major version to Soname

---
 CMakeLists.txt | 4 ++++
 1 file changed, 4 insertions(+)

--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -49,6 +49,7 @@
  
 string(TIMESTAMP SO${GUI}_BUILD_YEAR "%Y")
 math(EXPR SO${GUI}_SO_VERSION ${PROJECT_VERSION_MAJOR}*20)
+
 set(VERSION ${SO${GUI}_VERSION})
 
 if(POLICY CMP0072)
@@ -135,13 +136,16 @@
   string(REGEX REPLACE "^[0-9]+\\.([0-9])+\\.[0-9]+.*" "\\1" QT_VERSION_MINOR "${Qt5Core_VERSION_STRING}")
   string(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" QT_VERSION_PATCH "${Qt5Core_VERSION_STRING}")
   set(PACKAGE_ADDITIONAL_REQUIREMENTS "Qt5Core, Qt5Gui, Qt5OpenGL, Qt5Widgets")
+  set(QTMAJOR 5)
 else()
   set(QT_USE_IMPORTED_TARGETS ON)
   find_package(Qt4 COMPONENTS QtCore QtGui QtOpenGL REQUIRED)
   set(SOQT_QT_TARGETS Qt4::QtCore Qt4::QtGui Qt4::QtOpenGL)
   include(${QT_USE_FILE})
   set(PACKAGE_ADDITIONAL_REQUIREMENTS "QtCore, QtGui, QtOpenGL")
+  set(QTMAJOR 4)
 endif()
+set(SO${GUI}_SO_VERSION ${QTMAJOR}${SO${GUI}_SO_VERSION})
 
 find_package(X11)
 
