diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000000..458e4848bf --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,16 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "name": "Launch MaterialXView", + "type": "cppvsdbg", + "request": "launch", + "program": "${workspaceFolder}/build/bin/Debug/MaterialXView.exe", + "args": [], + "stopAtEntry": false, + "cwd": "${workspaceFolder}/resources/Materials/Examples/StandardSurface", + "environment": [], + "console": "integratedTerminal" + } + ] +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000000..63207a9546 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,13 @@ +{ + "cmake.sourceDirectory": "${workspaceFolder}", + "python.testing.pytestArgs": [ + "python/MaterialXTest" + ], + "python.testing.unittestEnabled": false, + "python.testing.pytestEnabled": true, + "python.testing.cwd": "${workspaceFolder}", + "python.analysis.extraPaths": [ + "${workspaceFolder}/build/python", + "${workspaceFolder}/python" + ] +} \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000000..7f16552fc9 --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,133 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "label": "Configure MaterialX", + "type": "shell", + "command": "cmake", + "args": [ + "--preset", + "default" + ], + "group": "build", + "problemMatcher": [], + "isBackground": false, + "options": { + "cwd": "${workspaceFolder}" + } + }, + { + "label": "Configure MaterialX (Metashade)", + "type": "shell", + "command": "cmake", + "args": [ + "--preset", + "metashade" + ], + "group": "build", + "problemMatcher": [], + "isBackground": false, + "options": { + "cwd": "${workspaceFolder}" + } + }, + { + "label": "Build MaterialX Debug", + "type": "shell", + "command": "cmake", + "args": [ + "--build", + "--preset", + "debug" + ], + "group": { + "kind": "build", + "isDefault": true + }, + "problemMatcher": [ + "$msCompile", + "$gcc" + ], + "isBackground": false, + "dependsOn": "Configure MaterialX", + "options": { + "cwd": "${workspaceFolder}" + } + }, + { + "label": "Build MaterialX Debug (Metashade)", + "type": "shell", + "command": "cmake", + "args": [ + "--build", + "--preset", + "debug-metashade" + ], + "group": "build", + "problemMatcher": [ + "$msCompile", + "$gcc" + ], + "isBackground": false, + "dependsOn": "Configure MaterialX (Metashade)", + "options": { + "cwd": "${workspaceFolder}" + } + }, + { + "label": "Install MaterialX Debug", + "type": "shell", + "command": "cmake", + "args": [ + "--install", + "build", + "--config", + "Debug" + ], + "group": "build", + "problemMatcher": [], + "isBackground": false, + "dependsOn": "Build MaterialX Debug", + "options": { + "cwd": "${workspaceFolder}" + } + }, + { + "label": "Build MaterialX Release (Metashade)", + "type": "shell", + "command": "cmake", + "args": [ + "--build", + "--preset", + "release-metashade" + ], + "group": "build", + "problemMatcher": [ + "$msCompile", + "$gcc" + ], + "isBackground": false, + "dependsOn": "Configure MaterialX (Metashade)", + "options": { + "cwd": "${workspaceFolder}" + } + }, + { + "label": "Clean MaterialX", + "type": "shell", + "command": "cmake", + "args": [ + "--build", + "build", + "--target", + "clean" + ], + "group": "build", + "problemMatcher": [], + "isBackground": false, + "options": { + "cwd": "${workspaceFolder}" + } + } + ] +} \ No newline at end of file diff --git a/CMakePresets.json b/CMakePresets.json new file mode 100644 index 0000000000..64fe1f0ead --- /dev/null +++ b/CMakePresets.json @@ -0,0 +1,64 @@ +{ + "version": 3, + "configurePresets": [ + { + "name": "windows-base", + "hidden": true, + "generator": "Visual Studio 17 2022", + "binaryDir": "${sourceDir}/build", + "cacheVariables": { + "CMAKE_INSTALL_PREFIX": "${sourceDir}/build/installed", + "MATERIALX_BUILD_VIEWER": "ON", + "MATERIALX_BUILD_GRAPH_EDITOR": "ON", + "MATERIALX_BUILD_PYTHON": "ON", + "MATERIALX_BUILD_TESTS": "ON", + "MATERIALX_BUILD_METASHADE": "OFF" + } + }, + { + "name": "default", + "inherits": "windows-base", + "displayName": "Default (Windows)", + "description": "Default build options for Windows (No Metashade)" + }, + { + "name": "metashade", + "inherits": "windows-base", + "displayName": "Metashade (Windows)", + "description": "Build with Metashade features enabled", + "cacheVariables": { + "MATERIALX_BUILD_METASHADE": "ON" + } + } + ], + "buildPresets": [ + { + "name": "debug", + "configurePreset": "default", + "configuration": "Debug", + "displayName": "Debug Build", + "description": "Debug build (Default)" + }, + { + "name": "debug-metashade", + "configurePreset": "metashade", + "configuration": "Debug", + "displayName": "Debug Build (Metashade)", + "description": "Debug build with Metashade" + }, + { + "name": "release", + "configurePreset": "default", + "configuration": "Release", + "displayName": "Release Build", + "description": "Release build" + }, + { + "name": "release-metashade", + "configurePreset": "metashade", + "configuration": "Release", + "displayName": "Release Build (Metashade)", + "description": "Release build with Metashade" + } + ] +} \ No newline at end of file