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/ctstraffic | |
Diffstat (limited to 'vcpkg/ports/ctstraffic')
| -rw-r--r-- | vcpkg/ports/ctstraffic/portfile.cmake | 29 | ||||
| -rw-r--r-- | vcpkg/ports/ctstraffic/prepare_for_build.cmake | 19 | ||||
| -rw-r--r-- | vcpkg/ports/ctstraffic/usage | 3 | ||||
| -rw-r--r-- | vcpkg/ports/ctstraffic/vcpkg.json | 15 |
4 files changed, 66 insertions, 0 deletions
diff --git a/vcpkg/ports/ctstraffic/portfile.cmake b/vcpkg/ports/ctstraffic/portfile.cmake new file mode 100644 index 0000000..ee63d07 --- /dev/null +++ b/vcpkg/ports/ctstraffic/portfile.cmake @@ -0,0 +1,29 @@ +vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO microsoft/ctsTraffic
+ REF 88a415197951912fc70e440b31cad8d4ff4ea68a
+ SHA512 152ee25d1ba70c68c5bae61ee08d1d2905efd28a10c48672de852c8ee9d0964a9202814cdcc40bca712ef69f952630509810827226861dad16516f5e0827d879
+ HEAD_REF master
+)
+
+set(VCPKG_BUILD_TYPE release) # Windows port only includes tools.
+
+include("${CURRENT_PORT_DIR}/prepare_for_build.cmake")
+prepare_for_build("${SOURCE_PATH}")
+
+vcpkg_list(SET MSBUILD_OPTIONS
+ "/p:UseVcpkg=yes"
+)
+
+vcpkg_msbuild_install(
+ SOURCE_PATH "${SOURCE_PATH}"
+ PROJECT_SUBPATH ctsTraffic/ctsTraffic.vcxproj
+ OPTIONS
+ ${MSBUILD_OPTIONS}
+)
+
+file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
+
+set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled)
+
+vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
diff --git a/vcpkg/ports/ctstraffic/prepare_for_build.cmake b/vcpkg/ports/ctstraffic/prepare_for_build.cmake new file mode 100644 index 0000000..90333e9 --- /dev/null +++ b/vcpkg/ports/ctstraffic/prepare_for_build.cmake @@ -0,0 +1,19 @@ +function(prepare_for_build CTSTRAFFIC_SOURCE_DIR)
+
+ message("-- Modifying hardcoded 'NuGet' directives in .vcxproj files")
+ file(GLOB_RECURSE PROJ_FILES "${CTSTRAFFIC_SOURCE_DIR}/*.vcxproj")
+
+ foreach(PROJ_FILE ${PROJ_FILES})
+ file(READ ${PROJ_FILE} PROJ_FILE_CONTENT)
+ STRING(REGEX
+ REPLACE
+ "<Target Name=\"EnsureNuGetPackageBuildImports\" BeforeTargets=\"PrepareForBuild\">"
+ "<Target Name=\"EnsureNuGetPackageBuildImports\" BeforeTargets=\"PrepareForBuild\" Condition=\"'$(UseVcpkg)' != 'yes'\">"
+ PROJ_FILE_CONTENT
+ "${PROJ_FILE_CONTENT}"
+ )
+
+ file(WRITE ${PROJ_FILE} "${PROJ_FILE_CONTENT}")
+ endforeach()
+
+endfunction()
diff --git a/vcpkg/ports/ctstraffic/usage b/vcpkg/ports/ctstraffic/usage new file mode 100644 index 0000000..3c3b743 --- /dev/null +++ b/vcpkg/ports/ctstraffic/usage @@ -0,0 +1,3 @@ +See https://github.com/microsoft/ctsTraffic for usage instructions or
+
+ .\ctsTraffic.exe -help
\ No newline at end of file diff --git a/vcpkg/ports/ctstraffic/vcpkg.json b/vcpkg/ports/ctstraffic/vcpkg.json new file mode 100644 index 0000000..ef5b3a0 --- /dev/null +++ b/vcpkg/ports/ctstraffic/vcpkg.json @@ -0,0 +1,15 @@ +{ + "name": "ctstraffic", + "version": "2.0.3.2", + "description": "ctsTraffic is a highly scalable client/server networking tool giving detailed performance and reliability analytics.", + "homepage": "https://github.com/microsoft/ctsTraffic/", + "license": "Apache-2.0", + "supports": "windows & !uwp", + "dependencies": [ + { + "name": "vcpkg-msbuild", + "host": true + }, + "wil" + ] +} |