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