[jigson] New port (#40913)

Co-authored-by: Kai Pastor <dg0yt@darc.de>
Co-authored-by: JonLiu1993 <63675417+JonLiu1993@users.noreply.github.com>
Co-authored-by: Jon <v-zhli17@microsoft.com>
Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
This commit is contained in:
XII 2024-09-16 20:09:31 +01:00 committed by GitHub
parent 86fba13068
commit 17ae26dff0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 60 additions and 0 deletions

View File

@ -0,0 +1,10 @@
if(NOT TARGET jigson::jigson)
include(CMakeFindDependencyMacro)
find_dependency(nlohmann_json CONFIG)
add_library(jigson::jigson INTERFACE IMPORTED)
set_target_properties(jigson::jigson PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include/jigson"
INTERFACE_LINK_LIBRARIES nlohmann_json::nlohmann_json
)
endif()

View File

@ -0,0 +1,19 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO JoshuaSledden/Jigson
REF "${VERSION}"
SHA512 dba66846021eab6914adf1e4d6e5fcd0fa5b54edea91c27d4d116002776ea1c1bcb5a6fed6b4778959d0aa525098ac037134842b65499ab2367b5d767b3cea10
HEAD_REF master
)
# Copy the header files
file(GLOB HEADER_FILES "${SOURCE_PATH}/src/Include/*")
file(COPY ${HEADER_FILES} DESTINATION "${CURRENT_PACKAGES_DIR}/include/jigson")
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
configure_file("${CMAKE_CURRENT_LIST_DIR}/jigson-config.cmake.in" "${CURRENT_PACKAGES_DIR}/share/${PORT}/jigson-config.cmake" @ONLY)
# Copy usage examples
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage"
DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")

4
ports/jigson/usage Normal file
View File

@ -0,0 +1,4 @@
jigson provides CMake targets:
find_package(jigson CONFIG REQUIRED)
target_link_libraries(main PRIVATE jigson::jigson)

14
ports/jigson/vcpkg.json Normal file
View File

@ -0,0 +1,14 @@
{
"name": "jigson",
"version": "0.1.2",
"description": "A simple C++ library designed to facilitate easy mapping from json content to a class model.",
"homepage": "https://github.com/JoshuaSledden/Jigson",
"license": "MIT",
"dependencies": [
"nlohmann-json",
{
"name": "vcpkg-cmake",
"host": true
}
]
}

View File

@ -3812,6 +3812,10 @@
"baseline": "2023-12-27",
"port-version": 0
},
"jigson": {
"baseline": "0.1.2",
"port-version": 0
},
"jinja2cpplight": {
"baseline": "2018-05-08",
"port-version": 3

9
versions/j-/jigson.json Normal file
View File

@ -0,0 +1,9 @@
{
"versions": [
{
"git-tree": "6c5106a8c6234b1ca9505150410f7c2d2dc1e79a",
"version": "0.1.2",
"port-version": 0
}
]
}