summaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
authorSamuel Martin <s.martin49@gmail.com>2014-08-31 21:55:16 +0200
committerPeter Korsgaard <peter@korsgaard.com>2014-08-31 22:26:31 +0200
commit022a48280ac5defc47ca0345db38b298da10fe94 (patch)
treeccf6ce68ba2d2bf2946e2dfef6eb7c1078b843dd /package
parent4a0dfea9c25edc09d4d404b4a6f939ecefdd63dd (diff)
package/yajl: fix static link
- disable shared object build when BR2_PREFER_STATIC_LIB is set Signed-off-by: Samuel Martin <s.martin49@gmail.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Diffstat (limited to 'package')
-rw-r--r--package/yajl/yajl-0002-cmake-disable-shared-library-build-when-BUILD_SHARED.patch44
1 files changed, 44 insertions, 0 deletions
diff --git a/package/yajl/yajl-0002-cmake-disable-shared-library-build-when-BUILD_SHARED.patch b/package/yajl/yajl-0002-cmake-disable-shared-library-build-when-BUILD_SHARED.patch
new file mode 100644
index 000000000..261c48665
--- /dev/null
+++ b/package/yajl/yajl-0002-cmake-disable-shared-library-build-when-BUILD_SHARED.patch
@@ -0,0 +1,44 @@
+From bb4fb7ff71fd6cadd9c1bf8716845a91e5998c0c Mon Sep 17 00:00:00 2001
+From: Samuel Martin <s.martin49@gmail.com>
+Date: Sun, 31 Aug 2014 00:39:11 +0200
+Subject: [PATCH 2/2] cmake: disable shared library build when
+ BUILD_SHARED_LIBS is off
+
+Signed-off-by: Samuel Martin <s.martin49@gmail.com>
+---
+ src/CMakeLists.txt | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index e36b736..6a24424 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -37,6 +37,7 @@ SET(LIBRARY_OUTPUT_PATH ${libDir})
+
+ ADD_LIBRARY(yajl_s STATIC ${SRCS} ${HDRS} ${PUB_HDRS})
+
++IF(BUILD_SHARED_LIBS)
+ ADD_LIBRARY(yajl SHARED ${SRCS} ${HDRS} ${PUB_HDRS})
+
+ #### setup shared library version number
+@@ -51,6 +52,7 @@ IF(APPLE)
+ SET_TARGET_PROPERTIES(yajl PROPERTIES
+ INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib")
+ ENDIF(APPLE)
++ENDIF(BUILD_SHARED_LIBS)
+
+ #### build up an sdk as a post build step
+
+@@ -78,7 +80,9 @@ INCLUDE_DIRECTORIES(${incDir}/..)
+ IF(NOT WIN32)
+ # at build time you may specify the cmake variable LIB_SUFFIX to handle
+ # 64-bit systems which use 'lib64'
++ IF(BUILD_SHARED_LIBS)
+ INSTALL(TARGETS yajl LIBRARY DESTINATION lib${LIB_SUFFIX})
++ ENDIF(BUILD_SHARED_LIBS)
+ INSTALL(TARGETS yajl_s ARCHIVE DESTINATION lib${LIB_SUFFIX})
+ INSTALL(FILES ${PUB_HDRS} DESTINATION include/yajl)
+ INSTALL(FILES ${incDir}/yajl_version.h DESTINATION include/yajl)
+--
+2.1.0
+