File tree Expand file tree Collapse file tree 4 files changed +79
-0
lines changed Expand file tree Collapse file tree 4 files changed +79
-0
lines changed Original file line number Diff line number Diff line change 1+ vcpkg_from_github(
2+ OUT_SOURCE_PATH SOURCE_PATH
3+ REPO chenjunfu2/NBT_CPP
4+ REF "v${VERSION} "
5+ HEAD_REF master
6+ SHA512 7356b4954107b62c7d97d0fb87112d571530333d26e087d2121e665b79970b9c7eb75bd62cf65e617a87dc399361fc1c7a383b30d68b954c44223b0d41401f79
7+ )
8+
9+ # install
10+ file (INSTALL "${SOURCE_PATH} /include/nbt_cpp/"
11+ DESTINATION "${CURRENT_PACKAGES_DIR} /include/nbt_cpp"
12+ FILES_MATCHING
13+ PATTERN "*.hpp"
14+ PATTERN "*.h"
15+ PATTERN "vcpkg_config.h" EXCLUDE
16+ )
17+
18+ # vcpkg_config
19+ set (CONFIG_HEADER_CONTENT "#pragma once\n\n " )
20+ set (CONFIG_HEADER_CONTENT "${CONFIG_HEADER_CONTENT} //Auto-generated by vcpkg - DO NOT EDIT\n\n " )
21+
22+ if ("zlib" IN_LIST FEATURES)
23+ set (CONFIG_HEADER_CONTENT "${CONFIG_HEADER_CONTENT} //use zlib\n " )
24+ set (CONFIG_HEADER_CONTENT "${CONFIG_HEADER_CONTENT} #define CJF2_NBT_CPP_USE_ZLIB\n\n " )
25+ endif ()
26+
27+ if ("xxhash" IN_LIST FEATURES)
28+ set (CONFIG_HEADER_CONTENT "${CONFIG_HEADER_CONTENT} //use xxhash\n " )
29+ set (CONFIG_HEADER_CONTENT "${CONFIG_HEADER_CONTENT} #define CJF2_NBT_CPP_USE_XXHASH\n\n " )
30+ endif ()
31+
32+ file (WRITE "${CURRENT_PACKAGES_DIR} /include/nbt_cpp/vcpkg_config.h" "${CONFIG_HEADER_CONTENT} " )
33+
34+ # copyright
35+ file (INSTALL "${SOURCE_PATH} /LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR} /share/${PORT} " RENAME copyright)
Original file line number Diff line number Diff line change 1+ {
2+ "name" : " chenjunfu2-nbt-cpp" ,
3+ "version" : " 1.0.0" ,
4+ "description" : " A header-only C++ library for [NBT(Named Binary Tag)]" ,
5+ "homepage" : " https://github.com/chenjunfu2/NBT_CPP" ,
6+ "license" : " MIT" ,
7+ "dependencies" : [
8+ {
9+ "name" : " vcpkg-cmake" ,
10+ "host" : true
11+ },
12+ {
13+ "name" : " vcpkg-cmake-config" ,
14+ "host" : true
15+ }
16+ ],
17+ "features" : {
18+ "xxhash" : {
19+ "description" : " Enable XXHASH support for hash functionality" ,
20+ "dependencies" : [
21+ " xxhash"
22+ ]
23+ },
24+ "zlib" : {
25+ "description" : " Enable ZLIB support for compression" ,
26+ "dependencies" : [
27+ " zlib"
28+ ]
29+ }
30+ }
31+ }
Original file line number Diff line number Diff line change 16961696 "baseline" : " 0.15.2" ,
16971697 "port-version" : 5
16981698 },
1699+ "chenjunfu2-nbt-cpp" : {
1700+ "baseline" : " 1.0.0" ,
1701+ "port-version" : 0
1702+ },
16991703 "chipmunk" : {
17001704 "baseline" : " 7.0.3" ,
17011705 "port-version" : 7
Original file line number Diff line number Diff line change 1+ {
2+ "versions" : [
3+ {
4+ "git-tree" : " 10ff539eca098b533decabc3b6b28519c5978018" ,
5+ "version" : " 1.0.0" ,
6+ "port-version" : 0
7+ }
8+ ]
9+ }
You can’t perform that action at this time.
0 commit comments