Skip to content

CMake: guard macOS framework post-build commands with OGRE_BUILD_LIBS_AS_FRAMEWORKS#572

Draft
taylorhoward92 wants to merge 1 commit intoOGRECave:masterfrom
taylorhoward92:fix/framework-guard
Draft

CMake: guard macOS framework post-build commands with OGRE_BUILD_LIBS_AS_FRAMEWORKS#572
taylorhoward92 wants to merge 1 commit intoOGRECave:masterfrom
taylorhoward92:fix/framework-guard

Conversation

@taylorhoward92
Copy link
Copy Markdown

Same fix as #569 (targeting v2-3), applied to master.

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.
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