X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=cirros-testvm%2Fsrc-cirros%2Fbuildroot-2015.05%2Fpackage%2Fpolarssl%2F0002-cmake-use-the-standard-CMake-flag-to-drive-the-share.patch;fp=cirros-testvm%2Fsrc-cirros%2Fbuildroot-2015.05%2Fpackage%2Fpolarssl%2F0002-cmake-use-the-standard-CMake-flag-to-drive-the-share.patch;h=d241ae264b2c36e9aa1f69f24b25863b3152ec9b;hb=b0a0f15dfaa205161a7fcb20cf1b8cd4948c2ef3;hp=0000000000000000000000000000000000000000;hpb=c6ac3cd55ee2da956195eee393b0882105dfad4e;p=packages%2Ftrusty%2Fcirros-testvm.git diff --git a/cirros-testvm/src-cirros/buildroot-2015.05/package/polarssl/0002-cmake-use-the-standard-CMake-flag-to-drive-the-share.patch b/cirros-testvm/src-cirros/buildroot-2015.05/package/polarssl/0002-cmake-use-the-standard-CMake-flag-to-drive-the-share.patch new file mode 100644 index 0000000..d241ae2 --- /dev/null +++ b/cirros-testvm/src-cirros/buildroot-2015.05/package/polarssl/0002-cmake-use-the-standard-CMake-flag-to-drive-the-share.patch @@ -0,0 +1,39 @@ +From a14028b0878c1ba27f7c7a6d0962874d0f7f3801 Mon Sep 17 00:00:00 2001 +From: Samuel Martin +Date: Sun, 31 Aug 2014 11:54:37 +0200 +Subject: [PATCH 3/3] cmake: use the standard CMake flag to drive the shared + object build + +If BUILD_SHARED_LIBS is set and not USE_SHARED_POLARSSL_LIBRARY, then +drive USE_SHARED_POLARSSL_LIBRARY with the BUILD_SHARED_LIBS value. + +Signed-off-by: Samuel Martin +--- + library/CMakeLists.txt | 14 ++++++++++++-- + 1 file changed, 12 insertions(+), 2 deletions(-) + +diff --git a/library/CMakeLists.txt b/library/CMakeLists.txt +index 27bd2e0..2ae0aba 100644 +--- a/library/CMakeLists.txt ++++ b/library/CMakeLists.txt +@@ -1,5 +1,15 @@ +-option(USE_STATIC_POLARSSL_LIBRARY "Build PolarSSL static library." ON) +-option(USE_SHARED_POLARSSL_LIBRARY "Build PolarSSL shared library." OFF) ++# Use the standard CMake flag to drive the shared object build. ++if(DEFINED BUILD_SHARED_LIBS AND NOT DEFINED USE_STATIC_POLARSSL_LIBRARY AND NOT DEFINED USE_SHARED_POLARSSL_LIBRARY) ++ set(USE_STATIC_POLARSSL_LIBRARY ON) ++ if(BUILD_SHARED_LIBS) ++ set(USE_SHARED_POLARSSL_LIBRARY ON) ++ else() ++ set(USE_SHARED_POLARSSL_LIBRARY OFF) ++ endif() ++else() ++ option(USE_STATIC_POLARSSL_LIBRARY "Build PolarSSL static library." ON) ++ option(USE_SHARED_POLARSSL_LIBRARY "Build PolarSSL shared library." OFF) ++endif() + + set(src + aes.c +-- +2.1.0 +