board/csky: fixup gdb instructions in readme.txt
[buildroot-gz.git] / package / musepack / 0002-cmake-use-the-standard-CMake-flag-to-drive-the-share.patch
blob4bfeca0a04d33ae28346b08ded10b129228079db
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
5 object build
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>
11 ---
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
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)
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()
39 add_definitions(-DFAST_MATH -DCVD_FASTLOG)
41 --
42 2.1.0