aboutsummaryrefslogtreecommitdiff
path: root/ports/json11
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/json11
parentf3db66b403840b24ea2612d09cca30a5285f5ea3 (diff)
downloadvcpkg-17b8cd9d0520ba5941d25de7e1373b62f7e53b5c.tar.gz
vcpkg-17b8cd9d0520ba5941d25de7e1373b62f7e53b5c.zip
[ppconsul] remove conflict with json11 (#6967)
* [ppconsol] remove conflict with json11
Diffstat (limited to 'ports/json11')
-rw-r--r--ports/json11/CONTROL2
-rw-r--r--ports/json11/destination.patch14
-rw-r--r--ports/json11/json11-config.cmake25
-rw-r--r--ports/json11/portfile.cmake3
4 files changed, 43 insertions, 1 deletions
diff --git a/ports/json11/CONTROL b/ports/json11/CONTROL
index d624f9e7b..34cee37de 100644
--- a/ports/json11/CONTROL
+++ b/ports/json11/CONTROL
@@ -1,3 +1,3 @@
Source: json11
-Version: 2017-06-20-1
+Version: 2017-06-20-2
Description: json11 is a tiny JSON library for C++11, providing JSON parsing and serialization.
diff --git a/ports/json11/destination.patch b/ports/json11/destination.patch
new file mode 100644
index 000000000..6d1630329
--- /dev/null
+++ b/ports/json11/destination.patch
@@ -0,0 +1,14 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 819c36f..847489e 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -52,6 +52,6 @@ if (JSON11_BUILD_TESTS)
+ target_link_libraries(json11_test json11)
+ endif()
+
+-install(TARGETS json11 DESTINATION lib/${CMAKE_LIBRARY_ARCHITECTURE})
+-install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/json11.hpp" DESTINATION include/${CMAKE_LIBRARY_ARCHITECTURE})
+-install(FILES "${CMAKE_CURRENT_BINARY_DIR}/json11.pc" DESTINATION lib/${CMAKE_LIBRARY_ARCHITECTURE}/pkgconfig)
++install(TARGETS json11 DESTINATION lib)
++install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/json11.hpp" DESTINATION include)
++install(FILES "${CMAKE_CURRENT_BINARY_DIR}/json11.pc" DESTINATION lib/pkgconfig)
diff --git a/ports/json11/json11-config.cmake b/ports/json11/json11-config.cmake
new file mode 100644
index 000000000..0bc3bb27c
--- /dev/null
+++ b/ports/json11/json11-config.cmake
@@ -0,0 +1,25 @@
+get_filename_component(_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
+
+if(NOT JSON11_FIND_COMPONENTS)
+ set(JSON11_FIND_COMPONENTS json11 json11)
+ if(JSON11_FIND_REQUIRED)
+ set(JSON11_FIND_REQUIRED_json11 TRUE)
+ endif()
+
+ set(JSON11_FOUND TRUE)
+endif()
+
+set(JSON11_INCLUDE_DIRS ${_DIR}/../../include)
+set(JSON11_LIBRARIES)
+if (EXISTS ${_DIR}/../../lib/libjson11.a)
+ list(APPEND JSON11_LIBRARIES optimized ${_DIR}/../../lib/libjson11.a)
+endif()
+if (EXISTS ${_DIR}/../../debug/lib/libjson11.a)
+ list(APPEND JSON11_LIBRARIES debug ${_DIR}/../../debug/lib/libjson11.a)
+endif()
+if (EXISTS ${_DIR}/../../lib/json11.lib)
+ list(APPEND JSON11_LIBRARIES optimized ${_DIR}/../../lib/json11.lib)
+endif()
+if (EXISTS ${_DIR}/../../debug/lib/json11.lib)
+ list(APPEND JSON11_LIBRARIES debug ${_DIR}/../../debug/lib/json11.lib)
+endif()
diff --git a/ports/json11/portfile.cmake b/ports/json11/portfile.cmake
index f6592693a..a3c2b9cab 100644
--- a/ports/json11/portfile.cmake
+++ b/ports/json11/portfile.cmake
@@ -8,6 +8,7 @@ vcpkg_from_github(
REF ec4e45219af1d7cde3d58b49ed762376fccf1ace
SHA512 2129e048d8dee027dc1ba789d9901e017b7d698465e15236802ef68639161e1cc7c8665d5f50079333801717fd41ffbe2cb90fa2165b9a85629e8ced8f2b3cd8
HEAD_REF master
+ PATCHES destination.patch
)
vcpkg_configure_cmake(
@@ -20,6 +21,8 @@ vcpkg_configure_cmake(
vcpkg_install_cmake()
vcpkg_copy_pdbs()
+file(INSTALL ${CURRENT_PORT_DIR}/json11-config.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/json11)
+
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
# Handle copyright