CMake: guard macOS framework post-build commands with OGRE_BUILD_LIBS_AS_FRAMEWORKS#572
Draft
taylorhoward92 wants to merge 1 commit intoOGRECave:masterfrom
Draft
CMake: guard macOS framework post-build commands with OGRE_BUILD_LIBS_AS_FRAMEWORKS#572taylorhoward92 wants to merge 1 commit intoOGRECave:masterfrom
taylorhoward92 wants to merge 1 commit intoOGRECave:masterfrom
Conversation
…_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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Same fix as #569 (targeting v2-3), applied to master.
Summary
On macOS (non-iOS),
OgreMain/CMakeLists.txtunconditionally runsdittoandmkdirto create anOgre.frameworkbundle 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 cleanuploop) in
if(OGRE_BUILD_LIBS_AS_FRAMEWORKS)/endif().ogre_config_framework()is left outside the guard since it alreadyhas its own internal framework check.
Test plan
-DOGRE_BUILD_LIBS_AS_FRAMEWORKS=OFF— nodittoerrors-DOGRE_BUILD_LIBS_AS_FRAMEWORKS=ON— framework bundle created as before