-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
48d0018
commit ecb78ba
Showing
26 changed files
with
208 additions
and
531 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,45 @@ | ||
cmake_minimum_required(VERSION 3.20) | ||
|
||
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_CURRENT_SOURCE_DIR}/vcpkg/scripts/buildsystems/vcpkg.cmake CACHE STRING "Vcpkg toolchain file") | ||
|
||
project(cpp_nostr) | ||
|
||
set(CMAKE_CPP_STANDARD 20) | ||
set(CMAKE_CXX_STANDARD 20) | ||
|
||
set(THREADS_PREFER_PTHREAD_FLAG ON) | ||
find_package(Threads REQUIRED) | ||
|
||
find_package(OpenSSL 3.1.1 REQUIRED COMPONENTS SSL Crypto) | ||
|
||
find_package(fmt CONFIG REQUIRED) | ||
find_package(nameof CONFIG REQUIRED) | ||
find_package(yyjson CONFIG REQUIRED) | ||
find_package(unofficial-secp256k1 CONFIG REQUIRED) | ||
find_package(libhv CONFIG REQUIRED) | ||
|
||
find_package(cpp_yyjson CONFIG REQUIRED) | ||
find_package(libbech32 CONFIG REQUIRED) | ||
|
||
add_executable(main src/main.cpp) | ||
|
||
target_compile_options(main PUBLIC -O2 -Wall) | ||
|
||
target_include_directories(main | ||
PUBLIC | ||
$<INSTALL_INTERFACE:include> | ||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> | ||
${OPENSSL_INCLUDE_DIR} | ||
PRIVATE | ||
${CMAKE_CURRENT_SOURCE_DIR}/src | ||
) | ||
|
||
target_link_libraries(main PUBLIC Threads::Threads) | ||
target_link_libraries(main PUBLIC ${OPENSSL_LIBRARIES}) | ||
target_link_libraries(main PUBLIC fmt::fmt) | ||
target_link_libraries(main PUBLIC nameof::nameof) | ||
target_link_libraries(main PUBLIC yyjson::yyjson) | ||
target_link_libraries(main PUBLIC unofficial::secp256k1_precomputed unofficial::secp256k1) | ||
target_link_libraries(main PUBLIC hv_static) | ||
target_link_libraries(main PUBLIC cpp_yyjson::cpp_yyjson) | ||
target_link_libraries(main PUBLIC bech32::bech32) |
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,13 @@ | ||
{ | ||
"version": 2, | ||
"configurePresets": [ | ||
{ | ||
"name": "default", | ||
"generator": "Ninja", | ||
"binaryDir": "${sourceDir}/build", | ||
"cacheVariables": { | ||
"CMAKE_TOOLCHAIN_FILE": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake" | ||
} | ||
} | ||
] | ||
} |
This file was deleted.
Oops, something went wrong.
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,21 @@ | ||
vcpkg_from_github( | ||
OUT_SOURCE_PATH SOURCE_PATH | ||
REPO yosh-matsuda/cpp-yyjson | ||
REF 506d59a8627ae58de92d9934113245ba83872a4c | ||
SHA512 d4ab75dbf490e087e9a6b5edb12816a28848e7d6661dcd69944927d8a264d9d229d3b690138277a22e496fbc453bb9aa657bbd1d9835e2f832d3eac65500f112 | ||
HEAD_REF main | ||
) | ||
|
||
vcpkg_cmake_configure( | ||
SOURCE_PATH "${SOURCE_PATH}" | ||
OPTIONS | ||
-DCPPYYJSON_BUILD_TEST=OFF | ||
) | ||
|
||
vcpkg_cmake_install() | ||
|
||
vcpkg_fixup_pkgconfig() | ||
|
||
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") | ||
|
||
vcpkg_copy_pdbs() |
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,26 @@ | ||
{ | ||
"name": "cpp-yyjson", | ||
"version-date": "2024-08-03", | ||
"port-version": 2, | ||
"description": "Ultra-fast and intuitive C++ JSON reader/writer with yyjson backend", | ||
"homepage": "https://github.com/yosh-matsuda/cpp-yyjson", | ||
"license": "MIT", | ||
"dependencies": [ | ||
{ | ||
"name": "vcpkg-cmake", | ||
"host": true | ||
}, | ||
{ | ||
"name": "vcpkg-cmake-config", | ||
"host": true | ||
}, | ||
"yyjson", | ||
"fmt", | ||
"nameof" | ||
], | ||
"features": { | ||
"examples": { | ||
"description": "Build examples" | ||
} | ||
} | ||
} |
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,26 @@ | ||
vcpkg_from_github( | ||
OUT_SOURCE_PATH SOURCE_PATH | ||
REPO dcdpr/libbech32 | ||
REF d77814708d5afe8d0c7bd42eb9ea7c85916b3ac2 | ||
SHA512 6780c407eb4247bd8e8d106f2104e7c3c511804d29330f8d9bec5c849c701082e8268716e90d0b162d2c591a2700abcaf62f4bb3fdff43edbdac2ae35b952405 | ||
HEAD_REF master | ||
) | ||
|
||
|
||
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS | ||
FEATURES | ||
examples LIBBECH32_BUILD_EXAMPLES | ||
) | ||
|
||
vcpkg_cmake_configure( | ||
SOURCE_PATH "${SOURCE_PATH}" | ||
OPTIONS | ||
${FEATURE_OPTIONS} | ||
) | ||
vcpkg_cmake_install() | ||
|
||
vcpkg_fixup_pkgconfig() | ||
|
||
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") | ||
|
||
vcpkg_copy_pdbs() |
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,23 @@ | ||
{ | ||
"name": "libbech32", | ||
"version-date": "2024-05-16", | ||
"port-version": 1, | ||
"description": "a C++ implementation of Bech32", | ||
"homepage": "https://github.com/dcdpr/libbech32", | ||
"license": "BSD-3-Clause", | ||
"dependencies": [ | ||
{ | ||
"name": "vcpkg-cmake", | ||
"host": true | ||
}, | ||
{ | ||
"name": "vcpkg-cmake-config", | ||
"host": true | ||
} | ||
], | ||
"features": { | ||
"examples": { | ||
"description": "Build examples" | ||
} | ||
} | ||
} |
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
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.