Skip to content

CMake: guard macOS framework post-build commands with OGRE_BUILD_LIBS_AS_FRAMEWORKS (v2-3)#569

Draft
taylorhoward92 wants to merge 1 commit intoOGRECave:v2-3from
taylorhoward92:fix/framework-guard-v2-3
Draft

CMake: guard macOS framework post-build commands with OGRE_BUILD_LIBS_AS_FRAMEWORKS (v2-3)#569
taylorhoward92 wants to merge 1 commit intoOGRECave:v2-3from
taylorhoward92:fix/framework-guard-v2-3

Conversation

@taylorhoward92
Copy link
Copy Markdown

Summary

On macOS (non-iOS), OgreMain/CMakeLists.txt unconditionally runs
ditto and mkdir to create an Ogre.framework bundle structure,
even when OGRE_BUILD_LIBS_AS_FRAMEWORKS=OFF.

This causes build failures in environments that don't have ditto
(e.g. minimal toolchain setups, package manager sandboxes) and creates
unnecessary framework directory structures.

Changes

Wrap the framework-specific post-build block (from
set(OGRE_OSX_BUILD_CONFIGURATION ...) through the header cleanup
loop) in if(OGRE_BUILD_LIBS_AS_FRAMEWORKS) / endif().

ogre_config_framework() is left outside the guard since it already
has its own internal framework check.

Test plan

  • Build on macOS with -DOGRE_BUILD_LIBS_AS_FRAMEWORKS=OFF — no ditto errors
  • Build on macOS with -DOGRE_BUILD_LIBS_AS_FRAMEWORKS=ON — framework bundle created as before

…_AS_FRAMEWORKS

On macOS (non-iOS), OgreMain/CMakeLists.txt unconditionally runs ditto
and mkdir to create an Ogre.framework bundle structure as a post-build
step. When OGRE_BUILD_LIBS_AS_FRAMEWORKS is OFF, the ditto command may
fail (it's not available outside Xcode/CommandLineTools environments)
and the framework directory structure is unnecessary.

Wrap the framework-specific post-build block in an
if(OGRE_BUILD_LIBS_AS_FRAMEWORKS) guard. No behavior change when
frameworks are enabled.
@taylorhoward92 taylorhoward92 changed the title CMake: guard macOS framework post-build commands with OGRE_BUILD_LIBS_AS_FRAMEWORKS CMake: guard macOS framework post-build commands with OGRE_BUILD_LIBS_AS_FRAMEWORKS (v2-3) Apr 10, 2026
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