diff options
author | Samuel Martin <s.martin49@gmail.com> | 2014-08-31 21:55:20 +0200 |
---|---|---|
committer | Peter Korsgaard <peter@korsgaard.com> | 2014-08-31 23:27:33 +0200 |
commit | d77b0a7d88d3e4aaca283e9350788793a695dcab (patch) | |
tree | dd215d509d9b6015a1bbd1759969831c60e0fc62 | |
parent | cd769f6104210fc488d8550243a8e08d07f361d1 (diff) | |
download | buildroot-d77b0a7d88d3e4aaca283e9350788793a695dcab.tar.gz buildroot-d77b0a7d88d3e4aaca283e9350788793a695dcab.zip |
package/musepack: fix static link
- disable shared object build when BR2_PREFER_STATIC_LIB is set
- patch the CMake code for handling static/shared object build using
standard CMake flags, instead of the custom ones.
Fixes:
http://autobuild.buildroot.org/results/e5e/e5eef14d5ed76db824c47a7e679e68397a023526/
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
-rw-r--r-- | package/musepack/musepack-0002-cmake-use-the-standard-CMake-flag-to-drive-the-share.patch | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/package/musepack/musepack-0002-cmake-use-the-standard-CMake-flag-to-drive-the-share.patch b/package/musepack/musepack-0002-cmake-use-the-standard-CMake-flag-to-drive-the-share.patch new file mode 100644 index 0000000000..4bfeca0a04 --- /dev/null +++ b/package/musepack/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 <s.martin49@gmail.com> +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 <s.martin49@gmail.com> +--- + 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 + |