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/correlation-vector-cpp | |
Diffstat (limited to 'vcpkg/ports/correlation-vector-cpp')
| -rw-r--r-- | vcpkg/ports/correlation-vector-cpp/correlation-vector.patch | 50 | ||||
| -rw-r--r-- | vcpkg/ports/correlation-vector-cpp/portfile.cmake | 28 | ||||
| -rw-r--r-- | vcpkg/ports/correlation-vector-cpp/usage | 4 | ||||
| -rw-r--r-- | vcpkg/ports/correlation-vector-cpp/vcpkg.json | 21 |
4 files changed, 103 insertions, 0 deletions
diff --git a/vcpkg/ports/correlation-vector-cpp/correlation-vector.patch b/vcpkg/ports/correlation-vector-cpp/correlation-vector.patch new file mode 100644 index 0000000..de1a2d5 --- /dev/null +++ b/vcpkg/ports/correlation-vector-cpp/correlation-vector.patch @@ -0,0 +1,50 @@ +diff --git a/CorrelationVector/CMakeLists.txt b/CorrelationVector/CMakeLists.txt +index 2b32f8b..2c3a0ec 100644 +--- a/CorrelationVector/CMakeLists.txt ++++ b/CorrelationVector/CMakeLists.txt +@@ -9,7 +9,7 @@ include (CVOptions) + include (CVHelpers) + + add_global_definitions () +-set_global_compile_flags () ++#set_global_compile_flags () + + set(CORRELATION_VECTOR_VERSION_MAJOR 1) + set(CORRELATION_VECTOR_VERSION_MINOR 0) +diff --git a/CorrelationVector/cmake/correlation_vector-config.in.cmake b/CorrelationVector/cmake/correlation_vector-config.in.cmake +index 6b389d5..9c4fb5a 100644 +--- a/CorrelationVector/cmake/correlation_vector-config.in.cmake ++++ b/CorrelationVector/cmake/correlation_vector-config.in.cmake +@@ -1 +1,7 @@ ++# Optional dependency for Linux
++if(UNIX)
++ include(CMakeFindDependencyMacro)
++ find_dependency(unofficial-libuuid)
++endif()
++
+ include("${CMAKE_CURRENT_LIST_DIR}/correlation_vector-targets.cmake") +\ No newline at end of file +diff --git a/CorrelationVector/src/CMakeLists.txt b/CorrelationVector/src/CMakeLists.txt +index 00baa66..08f3fc9 100644 +--- a/CorrelationVector/src/CMakeLists.txt ++++ b/CorrelationVector/src/CMakeLists.txt +@@ -15,16 +15,9 @@ else() + if (WIN32)
+ target_compile_definitions(${TARGETNAME} PUBLIC GUID_WINDOWS)
+ elseif (UNIX)
+- # apt-get install pkg-config uuid-dev
+- find_package(PkgConfig REQUIRED)
+- # TODO: move to FindUUID module
+- pkg_check_modules(UUID uuid)
+- if (UUID_FOUND)
+- message("Found and using uuid.")
+- target_include_directories(${TARGETNAME} PUBLIC ${UUID_INCLUDE_DIRS})
+- target_link_libraries(${TARGETNAME} PRIVATE ${UUID_LIBRARIES})
+- target_compile_definitions(${TARGETNAME} PUBLIC GUID_LIBUUID)
+- endif()
++ find_package(unofficial-libuuid REQUIRED)
++ target_compile_definitions(${TARGETNAME} PUBLIC GUID_LIBUUID)
++ target_link_libraries(${TARGETNAME} PRIVATE unofficial::UUID::uuid)
+ endif()
+ endif()
+
diff --git a/vcpkg/ports/correlation-vector-cpp/portfile.cmake b/vcpkg/ports/correlation-vector-cpp/portfile.cmake new file mode 100644 index 0000000..99555c7 --- /dev/null +++ b/vcpkg/ports/correlation-vector-cpp/portfile.cmake @@ -0,0 +1,28 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO microsoft/CorrelationVector-Cpp + REF cf38d2b44baaf352509ad9980786bc49554c32e4 + SHA512 f97eaef649ffd010fb79bca0ae6cb7ce6792dcb38f6a5180d04dc6542589d0d727583455bbafb319982cfed1291384180d49c7f32ebe7560b444ec132c76d0c4 + HEAD_REF master + PATCHES + "correlation-vector.patch" +) + +if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_check_linkage(ONLY_STATIC_LIBRARY) +endif() + +vcpkg_cmake_configure(SOURCE_PATH "${SOURCE_PATH}") +vcpkg_cmake_install() +vcpkg_fixup_pkgconfig() +vcpkg_cmake_config_fixup(PACKAGE_NAME correlation_vector CONFIG_PATH lib/correlation_vector) + +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") + +file(COPY "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +if(VCPKG_TARGET_IS_WINDOWS) + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") +endif() diff --git a/vcpkg/ports/correlation-vector-cpp/usage b/vcpkg/ports/correlation-vector-cpp/usage new file mode 100644 index 0000000..be0f91b --- /dev/null +++ b/vcpkg/ports/correlation-vector-cpp/usage @@ -0,0 +1,4 @@ +The package CorrelationVector-Cpp provides CMake targets:
+
+ find_package(correlation_vector CONFIG REQUIRED)
+ target_link_libraries(main PRIVATE microsoft::correlation_vector)
diff --git a/vcpkg/ports/correlation-vector-cpp/vcpkg.json b/vcpkg/ports/correlation-vector-cpp/vcpkg.json new file mode 100644 index 0000000..c7a602f --- /dev/null +++ b/vcpkg/ports/correlation-vector-cpp/vcpkg.json @@ -0,0 +1,21 @@ +{ + "name": "correlation-vector-cpp", + "version": "1.0", + "description": "CorrelationVector-Cpp provides a reference C++ implementation of the CorrelationVector protocol for tracing and correlation of events through a distributed system.", + "homepage": "https://github.com/microsoft/CorrelationVector-Cpp", + "license": "MIT", + "dependencies": [ + { + "name": "libuuid", + "platform": "!windows" + }, + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} |