Initial commit

This commit is contained in:
2024-09-13 23:01:27 +08:00
commit 4e07e943a4
9 changed files with 2150 additions and 0 deletions

31
CMakeLists.txt Normal file
View File

@@ -0,0 +1,31 @@
cmake_minimum_required(VERSION 3.26)
project(vsdbg-fix)
add_library(stub SHARED stub.cpp 3rdparty/hooker.c exports.def)
set(DST_PATH "C:/Users/Fragcolor2/.cursor/extensions/ms-vscode.cpptools-1.21.6-win32-x64/debugAdapters/vsdbg/bin")
# Set target name to vsdbg.dll
set_target_properties(stub PROPERTIES
OUTPUT_NAME vsdbg
)
target_compile_definitions(stub PUBLIC
_CRT_SECURE_NO_WARNINGS=1
HOOKER_X64=1
)
# Copy output dll to vsdbg directory
add_custom_command(
OUTPUT ${DST_PATH}/vsdbg.dll
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:stub> ${DST_PATH}
# Copy PDB too
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_PDB_FILE:stub> ${DST_PATH}
DEPENDS stub
COMMENT "Copying vsdbg.dll to ${DST_PATH}"
)
add_custom_target(copy_vsdbg ALL
DEPENDS ${DST_PATH}/vsdbg.dll
)