forked from pool/unittest-cpp
- Add shared.patch to build shared libraries. (with cmake) OBS-URL: https://build.opensuse.org/request/show/584403 OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/unittest-cpp?expand=0&rev=4
34 lines
1.1 KiB
Diff
34 lines
1.1 KiB
Diff
From: Jan Engelhardt <jengelh@inai.de>
|
|
Date: 2018-03-08 12:54:13.198886610 +0100
|
|
|
|
Enable shared build and properly version it.
|
|
|
|
---
|
|
CMakeLists.txt | 5 +++--
|
|
1 file changed, 3 insertions(+), 2 deletions(-)
|
|
|
|
Index: unittest-cpp-2.0.0/CMakeLists.txt
|
|
===================================================================
|
|
--- unittest-cpp-2.0.0.orig/CMakeLists.txt
|
|
+++ unittest-cpp-2.0.0/CMakeLists.txt
|
|
@@ -1,5 +1,6 @@
|
|
cmake_minimum_required(VERSION 2.8.1)
|
|
project(UnitTest++)
|
|
+set(XVERSION 2.0.0)
|
|
|
|
option(UTPP_USE_PLUS_SIGN
|
|
"Set this to OFF if you wish to use '-cpp' instead of '++' in lib/include paths"
|
|
@@ -55,10 +56,10 @@ file(GLOB platformSources_ RELATIVE ${CM
|
|
source_group(${platformDir_} FILES ${platformHeaders_} ${platformSources_})
|
|
|
|
# create the lib
|
|
-add_library(UnitTest++ STATIC ${headers_} ${sources_} ${platformHeaders_} ${platformSources_})
|
|
+add_library(UnitTest++ SHARED ${headers_} ${sources_} ${platformHeaders_} ${platformSources_})
|
|
|
|
if(${UTPP_USE_PLUS_SIGN})
|
|
- set_target_properties(UnitTest++ PROPERTIES OUTPUT_NAME UnitTest++)
|
|
+ set_target_properties(UnitTest++ PROPERTIES OUTPUT_NAME UnitTest++-${XVERSION})
|
|
endif()
|
|
|
|
|