summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTimothy Gu <timothygu99@gmail.com>2014-11-09 01:43:26 (GMT)
committerTimothy Gu <timothygu99@gmail.com>2014-11-09 01:44:19 (GMT)
commit1ab7a0bea72415f2e29a4b4317b183747e85a1b3 (patch)
tree5a60fe2a6475a58479ceb4ced7218e288dd7a913 /src
parent60a849f16253c33d996339c69017ff6e37b239b9 (diff)
downloadmxe-1ab7a0bea72415f2e29a4b4317b183747e85a1b3.zip
mxe-1ab7a0bea72415f2e29a4b4317b183747e85a1b3.tar.gz
mxe-1ab7a0bea72415f2e29a4b4317b183747e85a1b3.tar.bz2
json_spirit: Support shared builds
Signed-off-by: Timothy Gu <timothygu99@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/json_spirit-1-libs-crlf.patch42
-rw-r--r--src/json_spirit.mk14
2 files changed, 43 insertions, 13 deletions
diff --git a/src/json_spirit-1-libs-crlf.patch b/src/json_spirit-1-libs-crlf.patch
new file mode 100644
index 0000000..e5444fc
--- /dev/null
+++ b/src/json_spirit-1-libs-crlf.patch
@@ -0,0 +1,42 @@
+From 1351ac4833d49f49250c9f1e386b97a92b40c9fa Mon Sep 17 00:00:00 2001
+From: Timothy Gu <timothygu99@gmail.com>
+Date: Sat, 8 Nov 2014 20:02:08 -0500
+Subject: [PATCH] Use BUILD_SHARED_LIBS to determine the type of library to be
+ built
+
+Signed-off-by: Timothy Gu <timothygu99@gmail.com>
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 0b9ef30..2a54cc8 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -18,9 +18,4 @@ INSTALL(
+ ${CMAKE_SOURCE_DIR}/json_spirit/json_spirit_writer_options.h
+ DESTINATION include)
+
+-INSTALL(
+- FILES
+- ${CMAKE_BINARY_DIR}/json_spirit/libjson_spirit.a
+- DESTINATION lib)
+-
+ INCLUDE(CPack)
+diff --git a/json_spirit/CMakeLists.txt b/json_spirit/CMakeLists.txt
+index 04330f5..9b54790 100644
+--- a/json_spirit/CMakeLists.txt
++++ b/json_spirit/CMakeLists.txt
+@@ -13,5 +13,11 @@ json_spirit_writer_template.h )
+ FIND_PACKAGE(Boost 1.34 REQUIRED)
+ INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIR})
+
+-ADD_LIBRARY(json_spirit STATIC ${JSON_SPIRIT_SRCS})
++ADD_LIBRARY(json_spirit ${JSON_SPIRIT_SRCS})
++
++INSTALL(
++ TARGETS json_spirit
++ RUNTIME DESTINATION bin
++ LIBRARY DESTINATION lib
++ ARCHIVE DESTINATION lib)
+
+--
+1.9.1
+
diff --git a/src/json_spirit.mk b/src/json_spirit.mk
index ab54d55..92baaed 100644
--- a/src/json_spirit.mk
+++ b/src/json_spirit.mk
@@ -33,19 +33,7 @@ define $(PKG)_BUILD
-DCMAKE_TOOLCHAIN_FILE='$(CMAKE_TOOLCHAIN_FILE)' \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_RELEASE_POSTFIX='' \
- -DBoost_THREADAPI=win32 \
- -DBUILD_TESTS=OFF \
- -DBUILD_apps=OFF \
- -DBUILD_examples=OFF \
- -DBUILD_global_tests=OFF \
- -DBUILD_tools=OFF \
- -DHAVE_MM_MALLOC_EXITCODE=0 \
- -DHAVE_SSE4_1_EXTENSIONS_EXITCODE=0 \
- -DHAVE_SSE3_EXTENSIONS_EXITCODE=0 \
- -DHAVE_SSE2_EXTENSIONS_EXITCODE=0 \
- -DHAVE_SSE_EXTENSIONS_EXITCODE=0
+ -DBoost_THREADAPI=win32
$(MAKE) -C '$(1).build' -j '$(JOBS)' VERBOSE=1 || $(MAKE) -C '$(1)' -j 1 VERBOSE=1
$(MAKE) -C '$(1).build' -j 1 install VERBOSE=1
endef
-
-$(PKG)_BUILD_SHARED =