Skip to content

Instantly share code, notes, and snippets.

@grmartin
Created April 30, 2019 16:34
Show Gist options
  • Save grmartin/099c657eb6576831f3e82dcbd96703a0 to your computer and use it in GitHub Desktop.
Save grmartin/099c657eb6576831f3e82dcbd96703a0 to your computer and use it in GitHub Desktop.
Setting Debugger Arguments for Subtarget of CMake project in Visual Studio 2019

Setting Debugger Arguments for Subtarget of CMake project in Visual Studio 2019

General instructions can be found here. However they didnt quite work for me, but after some playing around i did manage to figure it out.

cmake_minimum_required(VERSION 3.13)
project(CVPlay)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED TRUE)
find_package(OpenCV REQUIRED)
add_executable(CVPlay main.cpp)
add_executable(CVPlayAnnotator annotation/main.cpp)
add_library(LibCVPlayAnnotation
annotation/JpegAnnotation.cpp annotation/JpegAnnotation.h
)
target_link_libraries(CVPlayAnnotator LibCVPlayAnnotation)
target_link_libraries(LibCVPlayAnnotation ${OpenCV_LIBS})
{
"version": "0.2.1",
"defaults": {},
"configurations": [
{
"type": "default",
"project": "CMakeLists.txt",
"name": "CMakeLists.txt"
},
{
"type": "default",
"projectTarget": "CVPlayAnnotator.exe",
"project": "CMakeLists.txt",
"name": "CVPlayAnnotator.exe get",
"args": [
"get",
"\"C:\\Users\\Glenn R. Martin\\Desktop\\myimage.jpg\""
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment