Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
C
capnproto
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
capnproto
Commits
5628f30b
Commit
5628f30b
authored
Mar 29, 2016
by
Branislav Katreniak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
json: integrate to build
parent
c242a3a0
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
69 additions
and
7 deletions
+69
-7
CMakeLists.txt
c++/CMakeLists.txt
+3
-0
Makefile.am
c++/Makefile.am
+24
-3
capnp-json.pc.in
c++/capnp-json.pc.in
+11
-0
FindCapnProto.cmake
c++/cmake/FindCapnProto.cmake
+6
-1
configure.ac
c++/configure.ac
+1
-1
regenerate-bootstraps.sh
c++/regenerate-bootstraps.sh
+2
-1
CMakeLists.txt
c++/src/capnp/CMakeLists.txt
+22
-1
json.capnp.c++
c++/src/capnp/compat/json.capnp.c++
+0
-0
json.capnp.h
c++/src/capnp/compat/json.capnp.h
+0
-0
No files found.
c++/CMakeLists.txt
View file @
5628f30b
...
...
@@ -109,6 +109,9 @@ if(NOT MSVC) # Don't install pkg-config files when building with MSVC
configure_file
(
capnp-rpc.pc.in
"
${
CMAKE_CURRENT_BINARY_DIR
}
/capnp-rpc.pc"
@ONLY
)
install
(
FILES
"
${
CMAKE_CURRENT_BINARY_DIR
}
/capnp-rpc.pc"
DESTINATION
"
${
LIB_INSTALL_DIR
}
/pkgconfig"
)
configure_file
(
capnp-json.pc.in
"
${
CMAKE_CURRENT_BINARY_DIR
}
/capnp-json.pc"
@ONLY
)
install
(
FILES
"
${
CMAKE_CURRENT_BINARY_DIR
}
/capnp-json.pc"
DESTINATION
"
${
LIB_INSTALL_DIR
}
/pkgconfig"
)
endif
()
unset
(
STDLIB_FLAG
)
...
...
c++/Makefile.am
View file @
5628f30b
...
...
@@ -74,7 +74,8 @@ public_capnpc_inputs = \
src/capnp/schema.capnp
\
src/capnp/rpc.capnp
\
src/capnp/rpc-twoparty.capnp
\
src/capnp/persistent.capnp
src/capnp/persistent.capnp
\
src/capnp/compat/json.capnp
capnpc_inputs
=
\
$(public_capnpc_inputs)
\
...
...
@@ -92,12 +93,15 @@ capnpc_outputs = \
src/capnp/rpc-twoparty.capnp.h
\
src/capnp/persistent.capnp.c++
\
src/capnp/persistent.capnp.h
\
src/capnp/compat/json.capnp.h
\
src/capnp/compat/json.capnp.c++
\
src/capnp/compiler/lexer.capnp.c++
\
src/capnp/compiler/lexer.capnp.h
\
src/capnp/compiler/grammar.capnp.c++
\
src/capnp/compiler/grammar.capnp.h
includecapnpdir
=
$(includedir)
/capnp
includecapnpcompatdir
=
$(includecapnpdir)
/compat
includekjdir
=
$(includedir)
/kj
includekjparsedir
=
$(includekjdir)
/parse
includekjstddir
=
$(includekjdir)
/std
...
...
@@ -183,10 +187,14 @@ includecapnp_HEADERS = \
src/capnp/persistent.capnp.h
\
src/capnp/ez-rpc.h
includecapnpcompat_HEADERS
=
\
src/capnp/compat/json.h
\
src/capnp/compat/json.capnp.h
if
LITE_MODE
lib_LTLIBRARIES
=
libkj.la libkj-test.la libcapnp.la
else
lib_LTLIBRARIES
=
libkj.la libkj-test.la libkj-async.la libcapnp.la libcapnp-rpc.la libcapnpc.la
lib_LTLIBRARIES
=
libkj.la libkj-test.la libkj-async.la libcapnp.la libcapnp-rpc.la libcapnp
-json.la libcapnp
c.la
endif
# Don't include security release in soname -- we want to replace old binaries
...
...
@@ -266,6 +274,12 @@ libcapnp_rpc_la_SOURCES= \
src/capnp/persistent.capnp.c++
\
src/capnp/ez-rpc.c++
libcapnp_json_la_LIBADD
=
libcapnp.la libkj-async.la libkj.la
$(PTHREAD_LIBS)
libcapnp_json_la_LDFLAGS
=
-release
$(SO_VERSION)
-no-undefined
libcapnp_json_la_SOURCES
=
\
src/capnp/compat/json.c++
\
src/capnp/compat/json.capnp.c++
libcapnpc_la_LIBADD
=
libcapnp.la libkj.la
$(PTHREAD_LIBS)
libcapnpc_la_LDFLAGS
=
-release
$(SO_VERSION)
-no-undefined
libcapnpc_la_SOURCES
=
\
...
...
@@ -388,9 +402,16 @@ heavy_tests = \
src/capnp/rpc-test.c++
\
src/capnp/rpc-twoparty-test.c++
\
src/capnp/ez-rpc-test.c++
\
src/capnp/compat/json-test.c++
\
src/capnp/compiler/lexer-test.c++
\
src/capnp/compiler/md5-test.c++
capnp_test_LDADD
=
libcapnpc.la libcapnp-rpc.la libcapnp.la libkj-async.la libkj-test.la libkj.la
capnp_test_LDADD
=
libcapnpc.la
\
libcapnp-rpc.la
\
libcapnp-json.la
\
libcapnp.la
\
libkj-async.la
\
libkj-test.la
\
libkj.la
endif
!LITE_MODE
...
...
c++/capnp-json.pc.in
0 → 100644
View file @
5628f30b
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@
Name: Cap'n Proto JSON
Description: JSON encoder and decoder for Cap'n Proto objects
Version: @VERSION@
Libs: -L${libdir} -lcapnp-json
Requires: capnp = @VERSION@ kj-async = @VERSION@
Cflags: -I${includedir}
c++/cmake/FindCapnProto.cmake
View file @
5628f30b
...
...
@@ -134,6 +134,7 @@ endfunction()
find_package
(
PkgConfig QUIET
)
pkg_check_modules
(
PKGCONFIG_CAPNP capnp
)
pkg_check_modules
(
PKGCONFIG_CAPNP_RPC capnp-rpc QUIET
)
pkg_check_modules
(
PKGCONFIG_CAPNP_JSON capnp-json QUIET
)
find_library
(
CAPNP_LIB_KJ kj
HINTS
"
${
PKGCONFIG_CAPNP_LIBDIR
}
"
${
PKGCONFIG_CAPNP_LIBRARY_DIRS
}
...
...
@@ -147,12 +148,16 @@ find_library(CAPNP_LIB_CAPNP capnp
find_library
(
CAPNP_LIB_CAPNP-RPC capnp-rpc
HINTS
"
${
PKGCONFIG_CAPNP_RPC_LIBDIR
}
"
${
PKGCONFIG_CAPNP_RPC_LIBRARY_DIRS
}
)
mark_as_advanced
(
CAPNP_LIB_KJ CAPNP_LIB_KJ-ASYNC CAPNP_LIB_CAPNP CAPNP_LIB_CAPNP-RPC
)
find_library
(
CAPNP_LIB_CAPNP-JSON capnp-json
HINTS
"
${
PKGCONFIG_CAPNP_JSON_LIBDIR
}
"
${
PKGCONFIG_CAPNP_JSON_LIBRARY_DIRS
}
)
mark_as_advanced
(
CAPNP_LIB_KJ CAPNP_LIB_KJ-ASYNC CAPNP_LIB_CAPNP CAPNP_LIB_CAPNP-RPC CAPNP_LIB_CAPNP-JSON
)
set
(
CAPNP_LIBRARIES_LITE
${
CAPNP_LIB_CAPNP
}
${
CAPNP_LIB_KJ
}
)
set
(
CAPNP_LIBRARIES
${
CAPNP_LIB_CAPNP-JSON
}
${
CAPNP_LIB_CAPNP-RPC
}
${
CAPNP_LIB_CAPNP
}
${
CAPNP_LIB_KJ-ASYNC
}
...
...
c++/configure.ac
View file @
5628f30b
...
...
@@ -101,5 +101,5 @@ AC_SUBST([STDLIB_FLAG])
LIBS="$PTHREAD_LIBS $LIBS"
CXXFLAGS="$CXXFLAGS $PTHREAD_CFLAGS"
AC_CONFIG_FILES([Makefile capnp.pc capnp-rpc.pc kj.pc kj-async.pc])
AC_CONFIG_FILES([Makefile capnp.pc capnp-rpc.pc
capnp-json.pc
kj.pc kj-async.pc])
AC_OUTPUT
c++/regenerate-bootstraps.sh
View file @
5628f30b
...
...
@@ -7,4 +7,5 @@ export PATH=$PWD/bin:$PWD:$PATH
capnp compile
-Isrc
--no-standard-import
--src-prefix
=
src
-oc
++:src
\
src/capnp/c++.capnp src/capnp/schema.capnp
\
src/capnp/compiler/lexer.capnp src/capnp/compiler/grammar.capnp
\
src/capnp/rpc.capnp src/capnp/rpc-twoparty.capnp src/capnp/persistent.capnp
src/capnp/rpc.capnp src/capnp/rpc-twoparty.capnp src/capnp/persistent.capnp
\
src/capnp/compat/json.capnp
c++/src/capnp/CMakeLists.txt
View file @
5628f30b
...
...
@@ -94,6 +94,26 @@ if(NOT CAPNP_LITE)
install
(
FILES
${
capnp-rpc_headers
}
${
capnp-rpc_schemas
}
DESTINATION
"
${
INCLUDE_INSTALL_DIR
}
/capnp"
)
endif
()
# capnp-json ========================================================================
set
(
capnp-json_sources
compat/json.c++
compat/json.capnp.c++
)
set
(
capnp-json_headers
compat/json.h
compat/json.capnp.h
)
set
(
capnp-json_schemas
compat/json.capnp
)
if
(
NOT CAPNP_LITE
)
add_library
(
capnp-json
${
capnp-json_sources
}
)
target_link_libraries
(
capnp-json capnp kj-async kj
)
install
(
TARGETS capnp-json ARCHIVE DESTINATION
"
${
LIB_INSTALL_DIR
}
"
)
install
(
FILES
${
capnp-json_headers
}
${
capnp-json_schemas
}
DESTINATION
"
${
INCLUDE_INSTALL_DIR
}
/capnp/compat"
)
endif
()
# Tools/Compilers ==============================================================
set
(
capnpc_sources
...
...
@@ -185,7 +205,7 @@ if(BUILD_TESTING)
if
(
CAPNP_LITE
)
set
(
test_libraries capnp kj-test kj
)
else
()
set
(
test_libraries capnp-rpc capnp capnpc kj-async kj-test kj
)
set
(
test_libraries capnp-
json capnp-
rpc capnp capnpc kj-async kj-test kj
)
endif
()
add_executable
(
capnp-tests
...
...
@@ -227,6 +247,7 @@ if(BUILD_TESTING)
compiler/lexer-test.c++
compiler/md5-test.c++
test-util.c++
compat/json-test.c++
${
test_capnp_cpp_files
}
${
test_capnp_h_files
}
)
...
...
c++/src/capnp/compat/json.capnp.c++
0 → 100644
View file @
5628f30b
This diff is collapsed.
Click to expand it.
c++/src/capnp/compat/json.capnp.h
0 → 100644
View file @
5628f30b
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment