1From d2f01ba6fa2a065156fad686d1849309c661e527 Mon Sep 17 00:00:00 2001 2From: Samuel Martin <s.martin49@gmail.com> 3Date: Sun, 31 Aug 2014 12:07:31 +0200 4Subject: [PATCH 2/2] cmake: use the standard CMake flag to drive the shared 5 object build 6 7If BUILD_SHARED_LIBS is set and SHARED undefined, then drive SHARED with 8the BUILD_SHARED_LIBS value. 9 10Signed-off-by: Samuel Martin <s.martin49@gmail.com> 11--- 12 CMakeLists.txt | 15 ++++++++++----- 13 1 file changed, 10 insertions(+), 5 deletions(-) 14 15diff --git a/CMakeLists.txt b/CMakeLists.txt 16index b13f78c..db75510 100755 17--- a/CMakeLists.txt 18+++ b/CMakeLists.txt 19@@ -7,11 +7,16 @@ project(libmpc C) 20 set(CMAKE_VERBOSE_MAKEFILE false) 21 TEST_BIG_ENDIAN(MPC_ENDIANNESS) 22 23-if(WIN32) 24- option(SHARED "Use shared libmpcdec" OFF) 25-else(WIN32) 26- option(SHARED "Use shared libmpcdec" ON) 27-endif(WIN32) 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}) 31+else() 32+ if(WIN32) 33+ option(SHARED "Use shared libmpcdec" OFF) 34+ else(WIN32) 35+ option(SHARED "Use shared libmpcdec" ON) 36+ endif(WIN32) 37+endif() 38 39 add_definitions(-DFAST_MATH -DCVD_FASTLOG) 40 41-- 422.1.0 43 44