-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
47 changed files
with
2,411 additions
and
494 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Run clang-format Linter | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request_target: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
|
||
jobs: | ||
format: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
# Give the default GITHUB_TOKEN write permission to commit and push the | ||
# added or changed files to the repository. | ||
contents: write | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
# check out HEAD on the branch | ||
ref: ${{ github.head_ref }} | ||
repository: ${{ github.event.pull_request.head.repo.full_name }} | ||
# make sure the parent commit is grabbed as well, because | ||
# that's what will get formatted (i.e. the most recent commit) | ||
fetch-depth: 2 | ||
# format the latest commit | ||
- uses: DoozyX/[email protected] | ||
with: | ||
source: "." | ||
exclude: "extern include" | ||
extensions: "h,cpp,c" | ||
clangFormatVersion: 16 | ||
inplace: True # commit the changes (if there are any) | ||
- name: Commit changes | ||
uses: stefanzweifel/git-auto-commit-action@v4 | ||
with: | ||
commit_message: "style: 🎨 apply clang-format changes" | ||
branch: ${{ github.head_ref }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#header-only library | ||
vcpkg_from_github( | ||
OUT_SOURCE_PATH SOURCE_PATH | ||
REPO thorsten-klein/rapidjson | ||
REF e38f585dc7a174a6664860986dcaaed959957cf0 | ||
SHA512 64d9912802dc7664568334f0950bcf414096090504f13faa99209707efe2c5933c0db18ea731416685263c83f75de496be12de288d3cf2adcdeff64b064ce783 | ||
FILE_DISAMBIGUATOR 2 | ||
HEAD_REF master | ||
) | ||
|
||
# Use RapidJSON's own build process, skipping examples and tests | ||
vcpkg_cmake_configure( | ||
SOURCE_PATH "${SOURCE_PATH}" | ||
OPTIONS | ||
-DRAPIDJSON_BUILD_DOC=OFF | ||
-DRAPIDJSON_BUILD_EXAMPLES=OFF | ||
-DRAPIDJSON_BUILD_TESTS=OFF | ||
) | ||
vcpkg_cmake_install() | ||
|
||
if(VCPKG_TARGET_IS_WINDOWS) | ||
vcpkg_cmake_config_fixup(CONFIG_PATH cmake) | ||
else() | ||
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/RapidJSON) | ||
endif() | ||
|
||
vcpkg_fixup_pkgconfig() | ||
|
||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/doc") | ||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share") | ||
|
||
if(VCPKG_TARGET_IS_WINDOWS) | ||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug" "${CURRENT_PACKAGES_DIR}/lib") | ||
endif() | ||
|
||
file(READ "${CURRENT_PACKAGES_DIR}/share/${PORT}/RapidJSONConfig.cmake" _contents) | ||
string(REPLACE "\${RapidJSON_SOURCE_DIR}" "\${RapidJSON_CMAKE_DIR}/../.." _contents "${_contents}") | ||
string(REPLACE "set( RapidJSON_SOURCE_DIR \"${SOURCE_PATH}\")" "" _contents "${_contents}") | ||
string(REPLACE "set( RapidJSON_DIR \"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel\")" "" _contents "${_contents}") | ||
string(REPLACE "\${RapidJSON_CMAKE_DIR}/../../../include" "\${RapidJSON_CMAKE_DIR}/../../include" _contents "${_contents}") | ||
file(WRITE "${CURRENT_PACKAGES_DIR}/share/${PORT}/RapidJSONConfig.cmake" "${_contents}\nset(RAPIDJSON_INCLUDE_DIRS \"\${RapidJSON_INCLUDE_DIRS}\")\n") | ||
|
||
file(INSTALL "${SOURCE_PATH}/license.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"name": "rapidjson", | ||
"version-date": "2023-07-17", | ||
"description": "A fast JSON parser/generator for C++ with both SAX/DOM style API <http://rapidjson.org/>", | ||
"homepage": "http://rapidjson.org/", | ||
"license": "MIT", | ||
"dependencies": [ | ||
{ | ||
"name": "vcpkg-cmake", | ||
"host": true | ||
}, | ||
{ | ||
"name": "vcpkg-cmake-config", | ||
"host": true | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,7 +20,7 @@ BEGIN | |
VALUE "FileDescription", "@PROJECT_NAME@" | ||
VALUE "FileVersion", "@[email protected]" | ||
VALUE "InternalName", "@PROJECT_NAME@" | ||
VALUE "LegalCopyright", "MIT License" | ||
VALUE "LegalCopyright", "GPLv3" | ||
VALUE "ProductName", "@PROJECT_NAME@" | ||
VALUE "ProductVersion", "@[email protected]" | ||
END | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.