From 8143634a4cca788771c03619337a04ca069de00f Mon Sep 17 00:00:00 2001 From: Tim Wojtulewicz Date: Fri, 5 Sep 2025 20:23:01 -0700 Subject: [PATCH] Windows: Generate launch.vs.json via CMake template --- CMakeLists.txt | 2 ++ cmake_templates/launch.vs.json.in | 23 +++++++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 cmake_templates/launch.vs.json.in diff --git a/CMakeLists.txt b/CMakeLists.txt index 56b8ec4b9e..cad4aec247 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -560,6 +560,8 @@ if (MSVC) # paths are stored in the output file. configure_file(cmake_templates/zeek-path-dev.bat.in ${CMAKE_CURRENT_BINARY_DIR}/zeek-path-dev.bat) + configure_file(cmake_templates/launch.vs.json.in + ${CMAKE_CURRENT_SOURCE_DIR}/.vs/launch.vs.json) string(REGEX REPLACE "^([A-Za-z]):/(.*)" "/\\1/\\2" cmake_binary_dir "${cmake_binary_dir}") string(REGEX REPLACE "^([A-Za-z]):/(.*)" "/\\1/\\2" cmake_current_binary_dir diff --git a/cmake_templates/launch.vs.json.in b/cmake_templates/launch.vs.json.in new file mode 100644 index 0000000000..a7254e7e91 --- /dev/null +++ b/cmake_templates/launch.vs.json.in @@ -0,0 +1,23 @@ +{ + "version": "0.2.1", + "defaults": {}, + "configurations": [ + { + "type": "default", + "project": "CMakeLists.txt", + "projectTarget": "zeek.exe (src\\zeek.exe)", + "name": "zeek.exe (src\\zeek.exe)", + "currentDir": "${cmake_source_dir}", + "args": [ + "-C", + "-r", + "${cmake_source_dir}/testing/btest/Traces/http/get.trace", + "local" + ], + "env": { + "ZEEKPATH": ".;${cmake_source_dir}/scripts;${cmake_source_dir}/scripts/policy;${cmake_source_dir}/scripts/site;${cmake_binary_dir}/scripts;${cmake_binary_dir}/scripts/builtin-plugins", + "ZEEK_PLUGIN_PATH": "${cmake_binary_dir}/src", + } + } + ] +}