aboutsummaryrefslogtreecommitdiff
path: root/ports/ppconsul
diff options
context:
space:
mode:
authorPhil Christensen <philc@microsoft.com>2019-06-22 23:30:45 -0700
committerGitHub <noreply@github.com>2019-06-22 23:30:45 -0700
commit17b8cd9d0520ba5941d25de7e1373b62f7e53b5c (patch)
tree2e67a0c3028de15bd1d46968f7d788cf3382401e /ports/ppconsul
parentf3db66b403840b24ea2612d09cca30a5285f5ea3 (diff)
downloadvcpkg-17b8cd9d0520ba5941d25de7e1373b62f7e53b5c.tar.gz
vcpkg-17b8cd9d0520ba5941d25de7e1373b62f7e53b5c.zip
[ppconsul] remove conflict with json11 (#6967)
* [ppconsol] remove conflict with json11
Diffstat (limited to 'ports/ppconsul')
-rw-r--r--ports/ppconsul/CONTROL4
-rw-r--r--ports/ppconsul/cmake_build.patch107
-rw-r--r--ports/ppconsul/portfile.cmake4
3 files changed, 76 insertions, 39 deletions
diff --git a/ports/ppconsul/CONTROL b/ports/ppconsul/CONTROL
index 4591b6a01..cc122ecf6 100644
--- a/ports/ppconsul/CONTROL
+++ b/ports/ppconsul/CONTROL
@@ -1,5 +1,5 @@
Source: ppconsul
-Version: 0.3
+Version: 0.3-1
Homepage: https://github.com/oliora/ppconsul
Description: A C++ client library for Consul. Consul is a distributed tool for discovering and configuring services in your infrastructure.
-Build-Depends: boost-core, boost-variant, curl[openssl]
+Build-Depends: boost-core, boost-variant, curl[openssl], json11
diff --git a/ports/ppconsul/cmake_build.patch b/ports/ppconsul/cmake_build.patch
index f607e37e4..95c795743 100644
--- a/ports/ppconsul/cmake_build.patch
+++ b/ports/ppconsul/cmake_build.patch
@@ -1,37 +1,70 @@
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 92e4698..002981e 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -75,6 +75,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")
-@@ -89,7 +91,6 @@ 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 8e24aab..beaac68 100644
---- a/src/CMakeLists.txt
-+++ b/src/CMakeLists.txt
-@@ -85,7 +85,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/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 962a1ac..6ab7f3b 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 <set>
+ #include <map>
diff --git a/ports/ppconsul/portfile.cmake b/ports/ppconsul/portfile.cmake
index 43e7eaeca..a1290019f 100644
--- a/ports/ppconsul/portfile.cmake
+++ b/ports/ppconsul/portfile.cmake
@@ -9,6 +9,10 @@ vcpkg_from_github(
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