Skip to content

Commit 3b6831e

Browse files
committed
release merge
2 parents 28bca1e + 47a85e5 commit 3b6831e

File tree

5 files changed

+72
-5
lines changed

5 files changed

+72
-5
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,12 @@ For Arch Linux there is a [PKGBUILD provided in the AUR](https://aur.archlinux.o
4444
sudo aura -A libjson-rpc-cpp
4545
```
4646

47+
**Gentoo Linux**
48+
49+
```sh
50+
sudo emerge dev-cpp/libjson-rpc-cpp
51+
```
52+
4753
**Mac OS X**
4854

4955
For OS X a [Brew](http://brew.sh) package is available:

docker/Dockerfile

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# THIS DOCKERFILE DOWNLOADS AND COMPILES CURL, LIBMICROHTTPD, JSONCPP, ARGTABLE AND LIBJSON-RPC-CPP FOR LINUX/DEBIAN
2+
3+
# 2015, author: Péricles Lopes Machado (gogo40) <[email protected]>
4+
# Based on Victor Laskin Dockerfile (http://vitiy.info/dockerfile-example-to-compile-libcurl-for-android-inside-docker-container/)
5+
6+
FROM debian:sid
7+
8+
MAINTAINER Péricles Lopes Machado <[email protected]>
9+
10+
# Create output directories
11+
12+
# Directory to export generated files
13+
RUN mkdir /output
14+
15+
# Directory with generated files
16+
RUN mkdir /build && mkdir /build/include
17+
18+
# Install compilation tools
19+
20+
RUN apt-get update
21+
22+
RUN apt-get install -y \
23+
wget \
24+
build-essential \
25+
cmake \
26+
libjsoncpp-dev \
27+
libargtable2-dev \
28+
libcurl4-openssl-dev \
29+
libmicrohttpd-dev \
30+
git
31+
32+
# Clone and build libjson-rpc-cpp
33+
34+
RUN git clone https://github.com/cinemast/libjson-rpc-cpp.git
35+
36+
RUN cd /libjson-rpc-cpp && \
37+
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_STATIC_LIBS=ON -DBUILD_SHARED_LIBS=ON \
38+
/libjson-rpc-cpp
39+
40+
RUN cd /libjson-rpc-cpp && \
41+
make -j $(nproc) && \
42+
make install
43+
44+
# Copy to output generated files
45+
46+
RUN cp -r /libjson-rpc-cpp/lib /build
47+
RUN cp -r /usr/local/include/jsonrpccpp /build/include/jsonrpccpp
48+
49+
# To get the results run container with output folder
50+
# Example: docker run -v HOSTFOLDER:/output --rm=true IMAGENAME
51+
52+
ENTRYPOINT cp -r /build/* /output
53+
54+

docker/build_linux_debian_libs.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/bash
2+
3+
docker build -t debian/libjson-rpc-cpp .
4+
docker run -v $PWD/output:/output --rm=true debian/libjson-rpc-cpp
5+

src/jsonrpccpp/CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ if (BUILD_SHARED_LIBS)
7979
endif()
8080

8181
# setup static common library
82-
if (BUILD_STATIC_LIBS)
82+
if (BUILD_STATIC_LIBS OR MSVC)
8383
add_library(jsonrpccommonStatic STATIC ${jsonrpc_source_common} ${jsonrpc_header} ${jsonrpc_helper_source_common})
8484
target_link_libraries(jsonrpccommonStatic ${JSONCPP_LIBRARIES})
8585
set_target_properties(jsonrpccommonStatic PROPERTIES OUTPUT_NAME jsonrpccpp-common)
@@ -98,7 +98,7 @@ if (BUILD_SHARED_LIBS)
9898
endif()
9999

100100
# setup static client library
101-
if (BUILD_STATIC_LIBS)
101+
if (BUILD_STATIC_LIBS OR MSVC)
102102
add_library(jsonrpcclientStatic STATIC ${jsonrpc_source_client} ${jsonrpc_header} ${jsonrpc_header_client} ${client_connector_source})
103103
target_link_libraries(jsonrpcclientStatic jsonrpccommonStatic ${client_connector_libs})
104104
set_target_properties(jsonrpcclientStatic PROPERTIES OUTPUT_NAME jsonrpccpp-client)
@@ -117,7 +117,7 @@ if (BUILD_SHARED_LIBS)
117117
endif()
118118

119119
# setup static server library
120-
if (BUILD_STATIC_LIBS)
120+
if (BUILD_STATIC_LIBS OR MSVC)
121121
add_library(jsonrpcserverStatic STATIC ${jsonrpc_source_server} ${jsonrpc_header} ${jsonrpc_header_server} ${server_connector_source})
122122
target_link_libraries(jsonrpcserverStatic jsonrpccommonStatic ${server_connector_libs})
123123
set_target_properties(jsonrpcserverStatic PROPERTIES OUTPUT_NAME jsonrpccpp-server)
@@ -133,7 +133,7 @@ if (BUILD_SHARED_LIBS OR NOT BUILD_STATIC_LIBS)
133133
list(APPEND ALL_LIBS jsonrpccommon jsonrpcclient jsonrpcserver)
134134
endif()
135135

136-
if (BUILD_STATIC_LIBS)
136+
if (BUILD_STATIC_LIBS OR MSVC)
137137
list(APPEND ALL_LIBS jsonrpccommonStatic jsonrpcclientStatic jsonrpcserverStatic)
138138
endif()
139139

src/stubgenerator/client/jsclientstubgenerator.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ using namespace std;
2323
request.id = id++;\n\
2424
request.jsonrpc = \"2.0\";\n\
2525
request.method = method;\n\
26-
request.params = params\n\
26+
if (params !== null) {\n\
27+
request.params = params;\n\
28+
}\n\
2729
JSON.stringify(request);\n\
2830
\n\
2931
$.ajax({\n\

0 commit comments

Comments
 (0)