Zorro666 / renderdoc

RenderDoc is a stand-alone graphics debugging tool.
https://renderdoc.org/builds
MIT License
3 stars 1 forks source link

Improve Xcode project generation for qrenderdoc #75

Closed Zorro666 closed 2 years ago

Zorro666 commented 2 years ago

Description

For a few months have been noticing dependency issues when building the qrenderdoc project with Xcode which I attributed to Xcode build system problems.

Investigating this dependency issue in more detail and discovered it works fine when using the makefile generator.

Examining the generated Xcode project shows the only dependency is the RenderDoc.icns file. The cmake file has this comment

# The case here is deliberately not matching the executable name
# This means the custom command doesn't create this output file,
# which causes CMake to rerun this target every time so that Qt
# can do dependency checking and rebuild anything necessary.

Xcode does not match this behaviour by default. There is an Xcode property to behave like this however, that is not exposed by cmake. To improve the Xcode qrenderdoc project dependency support manually add broad-brush qrenderdoc source files as dependencies. This is not guaranteed to be foolproof or future-proof, for those situations the local user can manually set the Xcode property to always run the qrenderdoc build target.

Tweaked the Xcode project for qrenderdoc to add the files to the UI grouped by the file system folders using the cmake source_group(TREE *) command ie.

image
Zorro666 commented 2 years ago

https://github.com/baldurk/renderdoc/pull/2632