1 From d2f01ba6fa2a065156fad686d1849309c661e527 Mon Sep 17 00:00:00 2001
2 From: Samuel Martin <s.martin49@gmail.com>
3 Date: Sun, 31 Aug 2014 12:07:31 +0200
4 Subject: [PATCH 2/2] cmake: use the standard CMake flag to drive the shared
7 If BUILD_SHARED_LIBS is set and SHARED undefined, then drive SHARED with
8 the BUILD_SHARED_LIBS value.
10 Signed-off-by: Samuel Martin <s.martin49@gmail.com>
12 CMakeLists.txt | 15 ++++++++++-----
13 1 file changed, 10 insertions(+), 5 deletions(-)
15 diff --git a/CMakeLists.txt b/CMakeLists.txt
16 index b13f78c..db75510 100755
19 @@ -7,11 +7,16 @@ project(libmpc C)
20 set(CMAKE_VERBOSE_MAKEFILE false)
21 TEST_BIG_ENDIAN(MPC_ENDIANNESS)
24 - option(SHARED "Use shared libmpcdec" OFF)
26 - option(SHARED "Use shared libmpcdec" ON)
28 +# Use the standard CMake flag to drive the shared object build.
29 +if(DEFINED BUILD_SHARED_LIBS AND NOT DEFINED SHARED)
30 + set(SHARED ${BUILD_SHARED_LIBS})
33 + option(SHARED "Use shared libmpcdec" OFF)
35 + option(SHARED "Use shared libmpcdec" ON)
39 add_definitions(-DFAST_MATH -DCVD_FASTLOG)