Configure vscode
This commit is contained in:
parent
431806eea4
commit
c2fa0d35da
63
.devcontainer/devcontainer.json
Normal file
63
.devcontainer/devcontainer.json
Normal file
@ -0,0 +1,63 @@
|
||||
{
|
||||
"name": "DeepStream Dev Container", //Defines the display name of the dev container in the VS Code UI
|
||||
|
||||
//"context": "..",
|
||||
// Specifies the build context for the container — i.e., the directory from which the Docker build command is run.
|
||||
// Use "." if your .devcontainer directory is at the root of the Docker context.
|
||||
// Use ".." if your .devcontainer/ folder is inside the project and the Dockerfile is in the parent folder.
|
||||
// If you are using a Docker image instead of building a Dockerfile, this field can be omitted.
|
||||
|
||||
// "dockerFile": "../Dockerfile", // path relative to .devcontainer
|
||||
// The "dockerFile" key tells VS Code which Dockerfile to use when building your development container.
|
||||
// Without this, VS Code won’t know how to construct the container environment — unless you're using
|
||||
// a prebuilt "image" instead.
|
||||
// You set it as a path relative to the .devcontainer/ folder.
|
||||
// Your .devcontainer/devcontainer.json is in: /path/to/project/.devcontainer/devcontainer.json
|
||||
// Your Dockerfile is in: /path/to/project/Dockerfile
|
||||
// If you use dockerFile, you must specify context, since Docker needs to know the build context.
|
||||
// 🔁 Alternative: Use a prebuilt image
|
||||
// If you don't have a Dockerfile and want to base your dev container on an existing
|
||||
// image (e.g., NVIDIA's DeepStream container), use:
|
||||
// "image": "nvcr.io/nvidia/deepstream:6.4-triton-devel"
|
||||
// And omit the dockerFile/context fields entirely.
|
||||
|
||||
|
||||
"workspaceFolder": "/root/temp_code/rtsp_in_rtsp_out", // your actual project path inside container
|
||||
// Sets the default working directory inside the container — this is where VS Code opens your workspace.
|
||||
// This should match the path inside the container where your source code is mounted.
|
||||
// It must exist after mounting.
|
||||
// Make sure this path matches the mount point + subfolder.
|
||||
|
||||
"mounts": [
|
||||
"source=/root/temp_code,target=/rtsp_in_rtsp_out,type=bind"
|
||||
],
|
||||
// Mounts files/directories from your host system into the container. Useful when your codebase or data is
|
||||
// outside of the default workspace path.
|
||||
// source: path on the host
|
||||
// target: path inside the container
|
||||
// type=bind: bind mount (like a symbolic link across environments)
|
||||
// Make sure this path works correctly and isn't conflicting with workspaceMount.
|
||||
|
||||
"customizations": {
|
||||
"vscode": {
|
||||
"settings": {
|
||||
"C_Cpp.default.configurationProvider": "ms-vscode.cmake-tools",
|
||||
"C_Cpp.default.compileCommands": "build/compile_commands.json"
|
||||
},
|
||||
"extensions": [
|
||||
"ms-vscode.cpptools",
|
||||
"ms-vscode.cmake-tools"
|
||||
]
|
||||
}
|
||||
},
|
||||
// Allows you to define VS Code-specific settings, extensions, or UI changes for the container.
|
||||
|
||||
//"settings": {
|
||||
// "C_Cpp.default.configurationProvider": "ms-vscode.cmake-tools",
|
||||
// "C_Cpp.default.compileCommands": "build/compile_commands.json"
|
||||
//},
|
||||
|
||||
"postCreateCommand": "echo Dev container ready" // "postCreateCommand": "cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=1 -B build -S ."
|
||||
// Runs a shell command after the container is created and ready (but before opening VS Code in it).
|
||||
// Use it to run cmake, install dependencies, or print a message.
|
||||
}
|
||||
24
.vscode/c_cpp_properties.json
vendored
Normal file
24
.vscode/c_cpp_properties.json
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
{
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Linux",
|
||||
"includePath": [
|
||||
"${workspaceFolder}/**",
|
||||
"/usr/include",
|
||||
"/usr/local/include",
|
||||
"/usr/local/cuda/include",
|
||||
"/usr/lib/x86_64-linux-gnu/glib-2.0/include",
|
||||
"/opt/nvidia/deepstream/deepstream-7.1/sources/includes",
|
||||
"/usr/include/gstreamer-1.0",
|
||||
"/usr/include/nlohmann",
|
||||
"/usr/include/glib-2.0"
|
||||
],
|
||||
"defines": [],
|
||||
"compilerPath": "/usr/bin/g++",
|
||||
"cStandard": "c17",
|
||||
"cppStandard": "c++17",
|
||||
"intelliSenseMode": "linux-gcc-x64"
|
||||
}
|
||||
],
|
||||
"version": 4
|
||||
}
|
||||
25
.vscode/launch.json
vendored
Normal file
25
.vscode/launch.json
vendored
Normal file
@ -0,0 +1,25 @@
|
||||
{
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Debug BodyPipeline",
|
||||
"type": "cppdbg",
|
||||
"request": "launch",
|
||||
"program": "${workspaceFolder}/build/BodyPipeline", // your output binary
|
||||
"args": [],
|
||||
"stopAtEntry": false,
|
||||
"cwd": "${workspaceFolder}",
|
||||
"environment": [],
|
||||
"externalConsole": false,
|
||||
"MIMode": "gdb",
|
||||
"miDebuggerPath": "/usr/bin/gdb",
|
||||
"setupCommands": [
|
||||
{
|
||||
"description": "Enable pretty-printing for gdb",
|
||||
"text": "-enable-pretty-printing",
|
||||
"ignoreFailures": true
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
8
.vscode/settings.json
vendored
Normal file
8
.vscode/settings.json
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
// auto-completion
|
||||
{
|
||||
"C_Cpp.default.compileCommands": "/home/user2/temp_code/build/compile_commands.json",
|
||||
"C_Cpp.default.intelliSenseMode": "linux-gcc-x64",
|
||||
"C_Cpp.default.cppStandard": "c++17",
|
||||
"C_Cpp.intelliSenseEngine": "default",
|
||||
"C_Cpp.default.configurationProvider": "ms-vscode.cmake-tools"
|
||||
}
|
||||
30
.vscode/tasks.json
vendored
Normal file
30
.vscode/tasks.json
vendored
Normal file
@ -0,0 +1,30 @@
|
||||
{
|
||||
"version": "2.0.0",
|
||||
"tasks": [
|
||||
{
|
||||
"label": "CMake Configure",
|
||||
"type": "shell",
|
||||
"command": "cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_EXPORT_COMPILE_COMMANDS=ON",
|
||||
"options": {
|
||||
"cwd": "${workspaceFolder}/build"
|
||||
},
|
||||
"problemMatcher": []
|
||||
},
|
||||
{
|
||||
"label": "CMake Build",
|
||||
"type": "shell",
|
||||
"command": "cmake --build . --config Release",
|
||||
"options": {
|
||||
"cwd": "${workspaceFolder}/build"
|
||||
},
|
||||
"problemMatcher": ["$gcc"],
|
||||
"dependsOn": ["CMake Configure"],
|
||||
"group": {
|
||||
"kind": "build",
|
||||
"isDefault": true
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
// "label": "Build",
|
||||
// "command": "cmake --build build",
|
||||
@ -29,8 +29,12 @@ endif()
|
||||
find_package(PkgConfig REQUIRED)
|
||||
# find_package(CUDA REQUIRED)
|
||||
find_package(prometheus-cpp REQUIRED)
|
||||
pkg_check_modules(GST REQUIRED gstreamer-1.0)
|
||||
include_directories(${GST_INCLUDE_DIRS})
|
||||
pkg_check_modules(GLIB REQUIRED glib-2.0 gobject-2.0 nlohmann_json gstreamer-base-1.0
|
||||
gstreamer-rtsp-server-1.0 gstreamer-rtsp-1.0 gstreamer-1.0 gstreamer-video-1.0)
|
||||
|
||||
add_definitions(${GST_CFLAGS_OTHER})
|
||||
|
||||
if(CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64")
|
||||
message("embed_platform on")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user