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/libp7client | |
Diffstat (limited to 'vcpkg/ports/libp7client')
| -rw-r--r-- | vcpkg/ports/libp7client/CMakeLists.txt | 46 | ||||
| -rw-r--r-- | vcpkg/ports/libp7client/portfile.cmake | 24 | ||||
| -rw-r--r-- | vcpkg/ports/libp7client/vcpkg.json | 14 |
3 files changed, 84 insertions, 0 deletions
diff --git a/vcpkg/ports/libp7client/CMakeLists.txt b/vcpkg/ports/libp7client/CMakeLists.txt new file mode 100644 index 0000000..f2eb53a --- /dev/null +++ b/vcpkg/ports/libp7client/CMakeLists.txt @@ -0,0 +1,46 @@ +project(P7) +cmake_minimum_required(VERSION 3.18) + +add_library(P7 + "Sources/ClBaical.cpp" + "Sources/ClFile.cpp" + "Sources/Client.cpp" + "Sources/ClNull.cpp" + "Sources/ClText.cpp" + "Sources/CRC32.cpp" + "Sources/Proxy.cpp" + "Sources/Telemetry.cpp" + "Sources/Trace.cpp") + +target_include_directories(P7 PRIVATE "Headers/") +target_include_directories(P7 PRIVATE "Shared/") +if(WIN32) + target_include_directories(P7 PRIVATE "Shared/Platforms/Windows_x86/") + target_link_libraries(P7 "ws2_32") +else() + target_include_directories(P7 PRIVATE "Shared/Platforms/Linux_x86/") +endif() + +if(WIN32) + set_target_properties(P7 PROPERTIES PREFIX "") + if(CMAKE_SIZEOF_VOID_P EQUAL 8) + set_target_properties(P7 PROPERTIES DEBUG_POSTFIX "x64d") + set_target_properties(P7 PROPERTIES RELEASE_POSTFIX "x64") + else() + set_target_properties(P7 PROPERTIES DEBUG_POSTFIX "x32d") + set_target_properties(P7 PROPERTIES RELEASE_POSTFIX "x32") + endif() +else() + set_target_properties(P7 PROPERTIES PREFIX "lib") + set_target_properties(P7 PROPERTIES POSTFIX "") + set_target_properties(P7 PROPERTIES DEBUG_POSTFIX "d") +endif() + +install(TARGETS P7 + RUNTIME DESTINATION "bin" + ARCHIVE DESTINATION "lib" + LIBRARY DESTINATION "lib") + +install(DIRECTORY Headers/ + DESTINATION include/P7 + FILES_MATCHING PATTERN "*.h") diff --git a/vcpkg/ports/libp7client/portfile.cmake b/vcpkg/ports/libp7client/portfile.cmake new file mode 100644 index 0000000..63131c5 --- /dev/null +++ b/vcpkg/ports/libp7client/portfile.cmake @@ -0,0 +1,24 @@ +vcpkg_download_distfile(ARCHIVE
+ URLS http://baical.net/files/libP7Client_v5.6.zip
+ FILENAME libP7Client_v5.6.zip
+ SHA512 992256854b717a45ae9e11ed16aa27b8b054de97718f027664634597d756aa26fe10dcad765cde7695802c90def46461abbcbfde81923fdd40ea2b659e1a8240
+)
+
+vcpkg_extract_source_archive(
+ SOURCE_PATH
+ ARCHIVE "${ARCHIVE}"
+ NO_REMOVE_ONE_LEVEL
+)
+
+file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}")
+
+vcpkg_cmake_configure(
+ SOURCE_PATH "${SOURCE_PATH}"
+)
+
+vcpkg_cmake_install()
+vcpkg_copy_pdbs()
+
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
+
+vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/License.txt")
diff --git a/vcpkg/ports/libp7client/vcpkg.json b/vcpkg/ports/libp7client/vcpkg.json new file mode 100644 index 0000000..4e2a563 --- /dev/null +++ b/vcpkg/ports/libp7client/vcpkg.json @@ -0,0 +1,14 @@ +{ + "name": "libp7client", + "version": "5.6", + "port-version": 5, + "description": "Open source, cross-platform, fastest library for sending logs, telemetry & trace data from your application.", + "homepage": "https://baical.net/", + "supports": "!(arm | uwp | osx)", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + } + ] +} |