Repository navigation
Conversation
…_CFLAGS for C++ too; macos (both targets) and tvOS read their target / phase / group UUIDs from the template so addon sources and settings stop going to orphan objects; CI regression test; bump version
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.
Fixes addon
ADDON_DEFINES/ADDON_CFLAGSin generated Xcode projects, and addons in general on themacosandtvosplatforms. CLI 0.113.0.[[null], "FOO"]The nested
[null]fromaddDefineon a missing key was already fixed in #651 (CLI 0.112.0,auto v = j[p]instead of brace-init). On current master the remaining problems were:Defines / flags (osx, ios, macos, tvos)
GCC_PREPROCESSOR_DEFINITIONS,OTHER_CFLAGS,OTHER_CPLUSPLUSFLAGSandOTHER_LDFLAGSset by addons now start with$(inherited)when PG creates the array (or converts a string value), so the CoreOF.xcconfig / Project.xcconfig defines still apply.-D/-U/-Iflags, are added once even if an addon is parsed twice or the project is regenerated (other flags aren't deduplicated:-framework A -framework Bare separate values).ADDON_CFLAGSalso go toOTHER_CPLUSPLUSFLAGS, like the makefiles. The template setsOTHER_CPLUSPLUSFLAGSat project level, so C++ never inheritedOTHER_CFLAGS, andADDON_CFLAGS = -DFOOnever reached.cppfiles.macosandtvos: addons went to orphan objectsxcodeProjecthard codes the osx and ios templates' UUIDs;macos(osx template + a multiplatform target) andtvosfell into the ios branch. Every addon source file, include path, define, flag and library was written into objects that don't exist in those templates (1D60588E…sources phase,1D605894…configs,29B97314…group), so Xcode ignored them and addon sources weren't compiled.macosuses the osx UUIDs.readTemplateUUIDs()reads the template's app targets, their build configurations and Sources / Frameworks / Resources / Copy Frameworks phases, and the main group'ssrc/addons/openFrameworksgroups, for anything the hard coded UUIDs don't match. osx and ios keep their hard coded UUIDs, so their output is unchanged.bin/datais now in the project tree for macos / tvos (was an orphan), and theopenFrameworksgroup path is no longer written to an empty key on ios when the project is outside OF.Tests
scripts/osx/test_xcode_addon_flags.sh(run fromtest_cmdline.sh): a temporary addon withADDON_DEFINES = FOO BAR=1andADDON_CFLAGS = -DBAZ, generated twice for osx / macos / ios / tvos; checks every app target configuration has$(inherited),FOO,BAR=1once each,OTHER_CFLAGS/OTHER_CPLUSPLUSFLAGSstart with$(inherited)and contain-DBAZonce, the addon source is in each target's Compile Sources, and there are no orphan objects. Passes with this PR, fails on master (osx: no$(inherited)/ no-DBAZfor C++; macos: orphans, nothing applied).bin/datain the tree without addons.#if !defined(FOO) || BAR != 1 || !defined(BAZ) #error) builds with xcodebuild; compile line has the xcconfig defines plus-DFOO -DBAR=1 -DBAZ.openFrameworksLibmacos project fails to link locally, and the template's multiplatform target points at a missingPreview Contentfolder — both independent of PG), ios / tvos (no simulator runtime locally).