vcpkg/ports/ctstraffic/prepare_for_build.cmake
Sam Yun e85cafa30d
Add ctstraffic port (microsoft/ctsTraffic) (#35238)
* Initial port

* Add to baseline

* Usage

* update hash

* Update to fixed version

* Update json

* Disallow uwp

* rename to ctstraffic

* Only build release

Co-authored-by: Cheney Wang <38240633+Cheney-W@users.noreply.github.com>

* Remove copy_pdbs

Co-authored-by: Cheney Wang <38240633+Cheney-W@users.noreply.github.com>

* Add line at end

Co-authored-by: Cheney Wang <38240633+Cheney-W@users.noreply.github.com>

* Update hash

* Update ports/ctstraffic/portfile.cmake

Co-authored-by: Cheney Wang <38240633+Cheney-W@users.noreply.github.com>

* Update hash

---------

Co-authored-by: Sam Yun <samyun@microsoft.com>
Co-authored-by: Cheney Wang <38240633+Cheney-W@users.noreply.github.com>
2023-11-30 13:58:50 -08:00

20 lines
749 B
CMake

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()