535ccb4d387479e35abea603882c6e6c7b06b43d
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / package / taglib / 0001-cmake-use-the-standard-CMake-flag-to-drive-the-share.patch
1 From 4e6a75eed3602f10aff516f49c8088c6da8db9df Mon Sep 17 00:00:00 2001
2 From: Samuel Martin <s.martin49@gmail.com>
3 Date: Sun, 31 Aug 2014 12:11:57 +0200
4 Subject: [PATCH 1/1] cmake: use the standard CMake flag to drive the shared
5  object build
6
7 If BUILD_SHARED_LIBS is set and ENABLE_STATIC undefined, then drive
8 ENABLE_STATIC with the BUILD_SHARED_LIBS value.
9
10 Signed-off-by: Samuel Martin <s.martin49@gmail.com>
11 ---
12  CMakeLists.txt | 12 +++++++++++-
13  1 file changed, 11 insertions(+), 1 deletion(-)
14
15 diff --git a/CMakeLists.txt b/CMakeLists.txt
16 index 317ffa1..9931957 100644
17 --- a/CMakeLists.txt
18 +++ b/CMakeLists.txt
19 @@ -2,7 +2,17 @@ project(taglib)
20  
21  cmake_minimum_required(VERSION 2.6.0 FATAL_ERROR)
22  
23 -option(ENABLE_STATIC "Make static version of libtag"  OFF)
24 +# Use the standard CMake flag to drive the shared object build.
25 +if(DEFINED BUILD_SHARED_LIBS AND NOT DEFINED ENABLE_STATIC)
26 +  if(BUILD_SHARED_LIBS)
27 +    set(ENABLE_STATIC OFF)
28 +  else()
29 +    set(ENABLE_STATIC ON)
30 +  endif()
31 +else()
32 +  option(ENABLE_STATIC "Make static version of libtag"  OFF)
33 +endif()
34 +
35  if(ENABLE_STATIC)
36    add_definitions(-DTAGLIB_STATIC)
37    set(BUILD_SHARED_LIBS OFF)
38 -- 
39 2.1.0
40