diff options
| author | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
|---|---|---|
| committer | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
| commit | 54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch) | |
| tree | d915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/sajson | |
Diffstat (limited to 'vcpkg/ports/sajson')
| -rw-r--r-- | vcpkg/ports/sajson/CMakeLists.txt | 26 | ||||
| -rw-r--r-- | vcpkg/ports/sajson/portfile.cmake | 24 | ||||
| -rw-r--r-- | vcpkg/ports/sajson/vcpkg.json | 16 |
3 files changed, 66 insertions, 0 deletions
diff --git a/vcpkg/ports/sajson/CMakeLists.txt b/vcpkg/ports/sajson/CMakeLists.txt new file mode 100644 index 0000000..da83270 --- /dev/null +++ b/vcpkg/ports/sajson/CMakeLists.txt @@ -0,0 +1,26 @@ +cmake_minimum_required(VERSION 3.8) + +project(sajson) + +add_library(sajson INTERFACE) + +target_compile_features(sajson INTERFACE cxx_std_11) + +target_include_directories(sajson INTERFACE + $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/include> + $<INSTALL_INTERFACE:include>) + +install(DIRECTORY include/ + DESTINATION include + USE_SOURCE_PERMISSIONS + FILES_MATCHING PATTERN "*.h" + ) + +install(TARGETS sajson EXPORT unofficial-sajson-config) + +install(EXPORT unofficial-sajson-config + FILE unofficial-sajson-config.cmake + NAMESPACE unofficial::sajson:: + DESTINATION share/cmake/unofficial-sajson + PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ +) diff --git a/vcpkg/ports/sajson/portfile.cmake b/vcpkg/ports/sajson/portfile.cmake new file mode 100644 index 0000000..6b88f5b --- /dev/null +++ b/vcpkg/ports/sajson/portfile.cmake @@ -0,0 +1,24 @@ +# Header-only library + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO chadaustin/sajson + REF 2dcfd350586375f9910f74821d4f07d67ae455ba + SHA512 6029a640f8bd6c7cefc507819a18a708f6d7e9ce84fdd2998506cea26d597b999d2776a7307908f5df02994bc53c3c9bdf6a73344ab70ee6a5c775b54351e7d2 + HEAD_REF master +) + +file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}") + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" +) + +vcpkg_cmake_install() + +vcpkg_cmake_config_fixup(PACKAGE_NAME unofficial-sajson CONFIG_PATH share/cmake/unofficial-sajson) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug") + +# Handle copyright +configure_file("${SOURCE_PATH}/LICENSE.txt" "${CURRENT_PACKAGES_DIR}/share/sajson/copyright" COPYONLY) diff --git a/vcpkg/ports/sajson/vcpkg.json b/vcpkg/ports/sajson/vcpkg.json new file mode 100644 index 0000000..5c831dc --- /dev/null +++ b/vcpkg/ports/sajson/vcpkg.json @@ -0,0 +1,16 @@ +{ + "name": "sajson", + "version-date": "2018-09-21", + "port-version": 3, + "description": "Lightweight, extremely high-performance JSON parser for C++11", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} |