-
-
Notifications
You must be signed in to change notification settings - Fork 322
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
38 changed files
with
1,346 additions
and
683 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,7 @@ xcuserdata | |
# svn & cvs | ||
.svn | ||
CVS | ||
|
||
reports/* | ||
doc/html | ||
CMakeLists.txt.user* | ||
src/examples/gen/* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,6 +28,10 @@ Veselin Rachev <[email protected]> | |
Marek Kotewicz <[email protected]> | ||
+ msvc support | ||
|
||
Alexandre Poirot <[email protected]> | ||
+ added client and server connectors that use Unix Domain Sockets | ||
+ adapted build file to generate pkg-config file for this lib. | ||
|
||
Bugfixes (chronological order) | ||
============================== | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,14 +11,23 @@ if (${CMAKE_MAJOR_VERSION} GREATER 2) | |
endif() | ||
|
||
set(MAJOR_VERSION 0) | ||
set(MINOR_VERSION 5) | ||
set(MINOR_VERSION 6) | ||
set(PATCH_VERSION 0) | ||
set(SO_VERSION 0) | ||
|
||
set(BUILD_STATIC_LIBS NO CACHE BOOL "Build static libraries in addition to shared") | ||
set(BUILD_SHARED_LIBS YES CACHE BOOL "Build shared libraries") | ||
set(BUILD_STATIC_LIBS NO CACHE BOOL "Build static libraries") | ||
set(LIB_SUFFIX "" CACHE STRING "Suffix for library directory (32/64)") | ||
|
||
if (NOT BUILD_SHARED_LIBS AND NOT BUILD_STATIC_LIBS) | ||
message(FATAL_ERROR "Both BUILD_SHARED_LIBS and BUILD_STATIC_LIBS are disabled") | ||
endif() | ||
|
||
# defaults for modules that can be enabled/disabled | ||
if(UNIX) | ||
set(UNIX_DOMAIN_SOCKET_SERVER YES CACHE BOOL "Include Unix Domain Socket server") | ||
set(UNIX_DOMAIN_SOCKET_CLIENT YES CACHE BOOL "Include Unix Domain Socket client") | ||
endif(UNIX) | ||
set(HTTP_SERVER YES CACHE BOOL "Include HTTP server using libmicrohttpd") | ||
set(HTTP_CLIENT YES CACHE BOOL "Include HTTP client support using curl") | ||
set(COMPILE_TESTS YES CACHE BOOL "Compile test framework") | ||
|
@@ -28,6 +37,10 @@ set(COMPILE_EXAMPLES YES CACHE BOOL "Compile example programs") | |
# print actual settings | ||
message(STATUS "HTTP_SERVER: ${HTTP_SERVER}") | ||
message(STATUS "HTTP_CLIENT: ${HTTP_CLIENT}") | ||
if(UNIX) | ||
message(STATUS "UNIXDOMAINSOCKET_SERVER: ${UNIX_DOMAIN_SOCKET_SERVER}") | ||
message(STATUS "UNIXDOMAINSOCKET_CLIENT: ${UNIX_DOMAIN_SOCKET_CLIENT}") | ||
endif(UNIX) | ||
message(STATUS "COMPILE_TESTS: ${COMPILE_TESTS}") | ||
message(STATUS "COMPILE_STUBGEN: ${COMPILE_STUBGEN}") | ||
message(STATUS "COMPILE_EXAMPLES: ${COMPILE_EXAMPLES}") | ||
|
@@ -61,13 +74,13 @@ if (COMPILE_STUBGEN) | |
endif () | ||
|
||
# setup examples | ||
if (HTTP_SERVER AND HTTP_CLIENT) | ||
if (COMPILE_EXAMPLES) | ||
add_subdirectory(src/examples) | ||
endif() | ||
|
||
# setup test suite | ||
if (Boost_FOUND AND COMPILE_TESTS) | ||
enable_testing() | ||
if (COMPILE_TESTS) | ||
enable_testing(true) | ||
add_subdirectory(src/test) | ||
endif() | ||
|
||
|
@@ -92,22 +105,4 @@ add_custom_target( | |
) | ||
|
||
# packaging stuff | ||
include(InstallRequiredSystemLibraries) | ||
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "libjson-rpc-cpp") | ||
set(CPACK_PACKAGE_VENDOR "Peter Spiess-Knafl <[email protected]>") | ||
set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README.md") | ||
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.txt") | ||
set(CPACK_PACKAGE_VERSION_MAJOR "${MAJOR_VERSION}") | ||
set(CPACK_PACKAGE_VERSION_MINOR "${MINOR_VERSION}") | ||
set(CPACK_PACKAGE_VERSION_PATCH "${PATCH_VERSION}") | ||
|
||
if (WIN32 AND NOT UNIX) | ||
set(CPACK_GENERATOR "NSIS") | ||
set(CPACK_NSIS_DISPLAY_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY} libjson-rpc-cpp") | ||
set(CPACK_NSIS_HELP_LINK "http://github.com/cinemast/libjson-rpc-cpp") | ||
set(CPACK_NSIS_URL_INFO_ABOUT "http://github.com/cinemast/libjson-rpc-cpp") | ||
set(CPACK_NSIS_CONTACT "[email protected]") | ||
set(CPACK_NSIS_MODIFY_PATH ON) | ||
endif(WIN32 AND NOT UNIX) | ||
include(CPack) | ||
|
||
include(CMakePackaging) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
include(InstallRequiredSystemLibraries) | ||
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "libjson-rpc-cpp") | ||
set(CPACK_PACKAGE_VENDOR "Peter Spiess-Knafl <[email protected]>") | ||
set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README.md") | ||
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.txt") | ||
set(CPACK_PACKAGE_VERSION_MAJOR "${MAJOR_VERSION}") | ||
set(CPACK_PACKAGE_VERSION_MINOR "${MINOR_VERSION}") | ||
set(CPACK_PACKAGE_VERSION_PATCH "${PATCH_VERSION}") | ||
|
||
if (WIN32 AND NOT UNIX) | ||
set(CPACK_GENERATOR "NSIS") | ||
set(CPACK_NSIS_DISPLAY_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY} libjson-rpc-cpp") | ||
set(CPACK_NSIS_HELP_LINK "http://github.com/cinemast/libjson-rpc-cpp") | ||
set(CPACK_NSIS_URL_INFO_ABOUT "http://github.com/cinemast/libjson-rpc-cpp") | ||
set(CPACK_NSIS_CONTACT "Peter Spiess-Knafl <[email protected]>") | ||
set(CPACK_NSIS_MODIFY_PATH ON) | ||
endif(WIN32 AND NOT UNIX) | ||
include(CPack) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
find_path( | ||
CATCH_INCLUDE_DIR | ||
NAMES catch.hpp | ||
DOC "catch include dir" | ||
) | ||
|
||
|
||
set(CATCH_INCLUDE_DIRS ${CATCH_INCLUDE_DIR}) | ||
|
||
|
||
include(FindPackageHandleStandardArgs) | ||
find_package_handle_standard_args(catch DEFAULT_MSG | ||
CATCH_INCLUDE_DIR) | ||
mark_as_advanced (CATCH_INCLUDE_DIR) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Name: libjsonrpccpp-client | ||
Description: A C++ client implementation of json-rpc. | ||
Version: ${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION} | ||
Libs: -L${FULL_PATH_LIBDIR} -ljsoncpp -ljsonrpccpp-common -ljsonrpccpp-client -lcurl | ||
Cflags: -I${FULL_PATH_INCLUDEDIR} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Name: libjsonrpccpp-common | ||
Description: Common libraries for libjson-rpc-cpp | ||
Version: ${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION} | ||
Libs: -L${FULL_PATH_LIBDIR} -ljsoncpp | ||
Cflags: -I${FULL_PATH_INCLUDEDIR} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Name: libjsonrpccpp-server | ||
Description: A C++ server implementation of json-rpc. | ||
Version: ${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION} | ||
Libs: -L${FULL_PATH_LIBDIR} -ljsoncpp -ljsonrpccpp-common -ljsonrpccpp-server -lmicrohttpd | ||
Cflags: -I${FULL_PATH_INCLUDEDIR} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Name: libjsonrpccpp-stub | ||
Description: library for stub-generation of libjson-rpc-cpp servers/clients. | ||
Version: ${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION} | ||
Libs: -L${FULL_PATH_LIBDIR} -ljsoncpp -ljsonrpccpp-common | ||
Cflags: -I${FULL_PATH_INCLUDEDIR} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,6 @@ | |
************************************************************************* | ||
* @file %FILENAME% | ||
* @date %DATE% | ||
* @author Peter Spiess-Knafl <[email protected]> | ||
* @author Peter Spiess-Knafl <[email protected]> | ||
* @license See attached LICENSE.txt | ||
************************************************************************/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
|
||
sudo apt-get install libmicrohttpd-dev libjsoncpp-dev libcurl4-openssl-dev cmake cppcheck valgrind gcovr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
cmake_minimum_required(VERSION 2.8) | ||
project(catch_builder CXX) | ||
include(ExternalProject) | ||
find_package(Git REQUIRED) | ||
|
||
ExternalProject_Add( | ||
catch | ||
PREFIX ${CMAKE_BINARY_DIR}/catch | ||
GIT_REPOSITORY https://github.com/philsquared/Catch.git | ||
TIMEOUT 10 | ||
UPDATE_COMMAND ${GIT_EXECUTABLE} pull | ||
CONFIGURE_COMMAND "" | ||
BUILD_COMMAND "" | ||
INSTALL_COMMAND "" | ||
LOG_DOWNLOAD ON | ||
) | ||
|
||
# Expose required variable (CATCH_INCLUDE_DIR) to parent scope | ||
ExternalProject_Get_Property(catch source_dir) | ||
set(CATCH_INCLUDE_DIR ${source_dir}/include CACHE INTERNAL "Path to include folder for Catch") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.