Skip to content

Commit

Permalink
libavc: Add VSCode configuration files for Linux & MacOS
Browse files Browse the repository at this point in the history
- Added .vscode directory with tasks.json, settings.json, c_cpp_properties.json, and launch.json.
- Configures the Build button to build the project.
- Configures Run and Debug panel to run avcdec and avcenc test benches.

Test: Build

Change-Id: Ifee9130f0041f77907a1a668227bc049270898e1
  • Loading branch information
sushant191k authored and Sushant committed Oct 14, 2024
1 parent 266cda3 commit 1586ee6
Show file tree
Hide file tree
Showing 4 changed files with 147 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .vscode/c_cpp_properties.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"configurations": [
{
"name": "Native",
"includePath": [
"${workspaceFolder}/**",
"${workspaceFolder}/common",
"${workspaceFolder}/decoder",
"${workspaceFolder}/encoder"
],
"defines": [],
"cStandard": "c17",
"cppStandard": "c++17",
"configurationProvider": "ms-vscode.cmake-tools"
}
],
"version": 4
}
81 changes: 81 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Run avcenc - Linux",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/build/avcenc",
"args": ["../examples/avcenc/enc.cfg"],
"stopAtEntry": false,
"cwd": "${workspaceFolder}/build",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
},
{
"name": "Run avcenc - Mac",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/build/avcenc",
"args": ["../examples/avcenc/enc.cfg"],
"stopAtEntry": false,
"cwd": "${workspaceFolder}/build",
"environment": [],
"externalConsole": false,
"MIMode": "lldb",
"setupCommands": [
{
"description": "Enable pretty-printing for lldb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
},
{
"name": "Run avcdec - Linux",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/build/avcdec",
"args": ["../examples/avcdec/dec.cfg"],
"stopAtEntry": false,
"cwd": "${workspaceFolder}/build",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
},
{
"name": "Run avcdec - Mac",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/build/avcdec",
"args": ["../examples/avcdec/dec.cfg"],
"stopAtEntry": false,
"cwd": "${workspaceFolder}/build",
"environment": [],
"externalConsole": false,
"MIMode": "lldb",
"setupCommands": [
{
"description": "Enable pretty-printing for lldb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
}
]
}
19 changes: 19 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"cmake.buildDirectory": "${workspaceFolder}/build",
"cmake.sourceDirectory": "${workspaceFolder}",
"cmake.configureArgs": [
"-DENABLE_MVC=OFF",
"-DENABLE_SVC=OFF",
"-DENABLE_TESTS=OFF",
"-DCMAKE_C_COMPILER=clang",
"-DCMAKE_CXX_COMPILER=clang++"
],
"cmake.preferredGenerators": [
"Unix Makefiles"
],
"cmake.debugConfig": {
"avcenc": "avcenc",
"avcdec": "avcdec"
},
"C_Cpp.default.configurationProvider": "ms-vscode.cmake-tools"
}
29 changes: 29 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"version": "2.0.0",
"tasks": [
{
"type": "cmake",
"label": "Configure",
"command": "configure",
"problemMatcher": [
"$gcc"
],
"group": "build"
},
{
"type": "cmake",
"label": "Build",
"command": "build",
"problemMatcher": [
"$gcc"
],
"group": {
"kind": "build",
"isDefault": true
},
"dependsOn": [
"Configure"
]
}
]
}

0 comments on commit 1586ee6

Please sign in to comment.