Skip to content

Adsk Contrib - Setup Debugger Env Paths#2262

Open
cozdas wants to merge 5 commits intoAcademySoftwareFoundation:mainfrom
cozdas:cozdas/VSDebuggerSupport
Open

Adsk Contrib - Setup Debugger Env Paths#2262
cozdas wants to merge 5 commits intoAcademySoftwareFoundation:mainfrom
cozdas:cozdas/VSDebuggerSupport

Conversation

@cozdas
Copy link
Collaborator

@cozdas cozdas commented Feb 3, 2026

This PR currently targets Visual Studio but can be extended to support other platforms if they suffer from the same issue.

The issue is, although the project dependencies tell the compiler and linker where to find the compile-time dependencies like header files or libraries, they do not help finding the run-time dependencies, such as OpenColorIO_2_X.dll if it's compiled as a shared library. This creates a friction while working on executable projects (such as ociomakeclf utility) because if you try to run/debug the project within Visual Studio debugger, the OpenColorIO dll that the ociomakeclf.exe depends on can't be found as they are compiled into separate folders. Glut and glew dlls can't be located either.

The only setup for locating the run-time dependencies we were doing was for the gpu tests with
set_tests_properties(test_gpu PROPERTIES ENVIRONMENT PATH=${NEW_PATH}) code fragment.
This makes CTest setup the Path env variable so that the DLLs can be located in run time during the tests but does not help with running test_gpu_exec within the IDE.

This PR is adding a utility CMake function set_debugger_env which project CMake files can call. This function currently sets up the VS_DEBUGGER_ENVIRONMENT property so that the generated visual studio project files have the correct debugger environment settings to locate the dependencies.

Above mentioned CTest path setting routine for the gpu test is also updated.

…hat the debugger can locate the run-time dependencies. This makes it possible to compile and launch the projects directly within visual studio for example.

- Calling the above function in projects that need it.

Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>
Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>
Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>
…structure. OCIO library files and the test files are separately grouped for better clarity.

Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>
Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant