X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=cirros-testvm%2Fsrc-cirros%2Fbuildroot-2015.05%2Fpackage%2Fmusepack%2F0002-cmake-use-the-standard-CMake-flag-to-drive-the-share.patch;fp=cirros-testvm%2Fsrc-cirros%2Fbuildroot-2015.05%2Fpackage%2Fmusepack%2F0002-cmake-use-the-standard-CMake-flag-to-drive-the-share.patch;h=4bfeca0a04d33ae28346b08ded10b129228079db;hb=b0a0f15dfaa205161a7fcb20cf1b8cd4948c2ef3;hp=0000000000000000000000000000000000000000;hpb=c6ac3cd55ee2da956195eee393b0882105dfad4e;p=packages%2Ftrusty%2Fcirros-testvm.git diff --git a/cirros-testvm/src-cirros/buildroot-2015.05/package/musepack/0002-cmake-use-the-standard-CMake-flag-to-drive-the-share.patch b/cirros-testvm/src-cirros/buildroot-2015.05/package/musepack/0002-cmake-use-the-standard-CMake-flag-to-drive-the-share.patch new file mode 100644 index 0000000..4bfeca0 --- /dev/null +++ b/cirros-testvm/src-cirros/buildroot-2015.05/package/musepack/0002-cmake-use-the-standard-CMake-flag-to-drive-the-share.patch @@ -0,0 +1,43 @@ +From d2f01ba6fa2a065156fad686d1849309c661e527 Mon Sep 17 00:00:00 2001 +From: Samuel Martin +Date: Sun, 31 Aug 2014 12:07:31 +0200 +Subject: [PATCH 2/2] cmake: use the standard CMake flag to drive the shared + object build + +If BUILD_SHARED_LIBS is set and SHARED undefined, then drive SHARED with +the BUILD_SHARED_LIBS value. + +Signed-off-by: Samuel Martin +--- + CMakeLists.txt | 15 ++++++++++----- + 1 file changed, 10 insertions(+), 5 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b13f78c..db75510 100755 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -7,11 +7,16 @@ project(libmpc C) + set(CMAKE_VERBOSE_MAKEFILE false) + TEST_BIG_ENDIAN(MPC_ENDIANNESS) + +-if(WIN32) +- option(SHARED "Use shared libmpcdec" OFF) +-else(WIN32) +- option(SHARED "Use shared libmpcdec" ON) +-endif(WIN32) ++# Use the standard CMake flag to drive the shared object build. ++if(DEFINED BUILD_SHARED_LIBS AND NOT DEFINED SHARED) ++ set(SHARED ${BUILD_SHARED_LIBS}) ++else() ++ if(WIN32) ++ option(SHARED "Use shared libmpcdec" OFF) ++ else(WIN32) ++ option(SHARED "Use shared libmpcdec" ON) ++ endif(WIN32) ++endif() + + add_definitions(-DFAST_MATH -DCVD_FASTLOG) + +-- +2.1.0 +