9ea4579
From bf889786c2a3a2dab89610d0722634d2eedfc694 Mon Sep 17 00:00:00 2001
9ea4579
From: Andreas Schuh <andreas.schuh.84@gmail.com>
9ea4579
Date: Thu, 1 May 2014 20:16:16 +0100
9ea4579
Subject: [PATCH] Set VERSION property of library targets to <major>.<minor>.
9ea4579
9ea4579
---
9ea4579
 CMakeLists.txt | 5 +++++
9ea4579
 1 file changed, 5 insertions(+)
9ea4579
9ea4579
diff --git a/CMakeLists.txt b/CMakeLists.txt
9ea4579
index a4d0f07..7f65563 100644
9ea4579
--- a/CMakeLists.txt
9ea4579
+++ b/CMakeLists.txt
9ea4579
@@ -22,6 +22,8 @@ version_numbers (
9ea4579
     PACKAGE_VERSION_PATCH
9ea4579
 )
9ea4579
 
9ea4579
+set (PACKAGE_SOVERSION "${PACKAGE_VERSION_MAJOR}.${PACKAGE_VERSION_MINOR}")
9ea4579
+
9ea4579
 # ----------------------------------------------------------------------------
9ea4579
 # options
9ea4579
 set (GFLAGS_NAMESPACE   "${PACKAGE_NAME}" CACHE STRING "C++ namespace identifier of gflags library.")
9ea4579
@@ -257,6 +259,9 @@ foreach (TYPE IN ITEMS STATIC SHARED)
9ea4579
         set_target_properties (
9ea4579
           gflags${opts}-${type} PROPERTIES COMPILE_DEFINITIONS "${defines}"
9ea4579
                                            OUTPUT_NAME "gflags${opts}"
9ea4579
+                                           # Set VERSION instead of SOVERSION such
9ea4579
+                                           # that it is also used on Windows
9ea4579
+                                           VERSION "${PACKAGE_SOVERSION}"
9ea4579
         )
9ea4579
         if (HAVE_SHLWAPI_H)
9ea4579
           target_link_libraries (gflags${opts}-${type} shlwapi.lib)
9ea4579
-- 
9ea4579
1.9.0
9ea4579