early-access version 2853

This commit is contained in:
pineappleEA
2022-07-23 03:01:36 +02:00
parent 1f2b5081b5
commit 1f111bb69c
8955 changed files with 418777 additions and 999 deletions

View File

@@ -0,0 +1,70 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 92e4698..aa643aa 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -52,6 +52,8 @@ endif()
enable_testing()
+find_package(json11 REQUIRED)
+
if (${USE_CPPNETLIB})
find_package(Boost ${BOOST_MIN_VERSION} REQUIRED COMPONENTS thread filesystem system date_time chrono regex)
@@ -75,6 +77,8 @@ else ()
set (CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} "${CURL_ROOT}/lib")
endif ()
find_package(CURL REQUIRED)
+ find_package(OpenSSL REQUIRED)
+ find_package(ZLIB REQUIRED)
endif ()
set(LIBB64_DIR "${PROJECT_SOURCE_DIR}/ext/b64")
@@ -87,9 +91,7 @@ if (WIN32 AND NOT BUILD_STATIC_LIB)
message(FATAL_ERROR "Building Ppconsul as dynamic library on Windows is not supported, see https://github.com/oliora/ppconsul/issues/25")
endif()
-add_subdirectory(ext/json11)
add_subdirectory(src)
-add_subdirectory(tests)
install(
DIRECTORY "${HEADERS_DIR}"
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index d747100..966c7e2 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -78,7 +78,7 @@ target_include_directories(${PROJECT_NAME}
target_link_libraries(${PROJECT_NAME}
PRIVATE
- json11
+ ${JSON11_LIBRARIES}
${Boost_LIBRARIES}
)
@@ -87,7 +87,10 @@ if (${USE_CPPNETLIB})
target_link_libraries(${PROJECT_NAME} PRIVATE ${CPPNETLIB_LIBRARIES})
else ()
target_include_directories(${PROJECT_NAME} PRIVATE ${CURL_INCLUDE_DIR})
- target_link_libraries(${PROJECT_NAME} PRIVATE ${CURL_LIBRARIES})
+ target_link_libraries(${PROJECT_NAME} PRIVATE ${CURL_LIBRARIES} ${OPENSSL_LIBRARIES} ZLIB::ZLIB)
+ if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
+ target_link_libraries(${PROJECT_NAME} PRIVATE "-framework CoreFoundation" "-framework Security")
+ endif ()
endif ()
source_group(${PROJECT_NAME} FILES ${SOURCES})
diff --git a/src/s11n.h b/src/s11n.h
index c317834..3cb03c4 100644
--- a/src/s11n.h
+++ b/src/s11n.h
@@ -6,7 +6,7 @@
#include "ppconsul/config.h"
#include "ppconsul/error.h"
-#include <json11/json11.hpp>
+#include <json11.hpp>
#include <vector>
#include <chrono>
#include <set>

29
externals/vcpkg/ports/ppconsul/portfile.cmake vendored Executable file
View File

@@ -0,0 +1,29 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO oliora/ppconsul
REF 8aed30cae0e2df76d920b5cd77933604a4644ee9
SHA512 756f07c7c8099868fa181571941f511987088abc110ad5eda517ad591ed10b40532cd7b1541dbdad76c2617ce804a1dc26a121380f20f8e4a40e29063523cbbd
HEAD_REF master
PATCHES "cmake_build.patch"
)
# Force the use of the vcpkg installed versions
file(REMOVE_RECURSE ${SOURCE_PATH}/ext/json11)
file(REMOVE_RECURSE ${SOURCE_PATH}/ext/catch)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
)
vcpkg_install_cmake()
vcpkg_fixup_cmake_targets(CONFIG_PATH cmake)
file(INSTALL ${SOURCE_PATH}/LICENSE_1_0.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
vcpkg_copy_pdbs()
vcpkg_fixup_pkgconfig()

20
externals/vcpkg/ports/ppconsul/vcpkg.json vendored Executable file
View File

@@ -0,0 +1,20 @@
{
"name": "ppconsul",
"version-string": "0.5",
"port-version": 3,
"description": "A C++ client library for Consul. Consul is a distributed tool for discovering and configuring services in your infrastructure.",
"homepage": "https://github.com/oliora/ppconsul",
"dependencies": [
"boost-core",
"boost-fusion",
"boost-optional",
"boost-variant",
{
"name": "curl",
"features": [
"openssl"
]
},
"json11"
]
}