6 Commits
Author SHA1 Message Date
Tor Arne Vestbø 41f8011d61 Xcode: Don't add bare-name framework items to the link build phase
XCODE_LINK_BUILD_PHASE_MODE KNOWN_LOCATION moves non-target library
items with a known path into the "Link Binary With Libraries" build
phase, requiring a valid PBXFileReference. Framework items specified
without a directory component (e.g. $<LINK_LIBRARY:FRAMEWORK,Foundation>)
are stored as ItemIsPath::Yes in cmComputeLinkInformation, but their
value is just a bare name. This caused CreateXCodeFileReferenceFromPath
to CollapseFullPath the bare name against the current working directory,
producing a broken reference to a non-existent path that Xcode shows
as a missing file, and that results in failure to link the project.

We now check that a non-target framework item has a non-empty directory
component before allowing it into the link phase. Without a concrete
path we can't produce a valid PBXFileReference, so we fall back to
OTHER_LDFLAGS where the item is already correctly formatted as
-framework Name.
2026-05-11 22:22:20 +02:00
Brad King 68a07a6610 Tests: Add missing cmake_minimum_required calls 2024-11-20 10:54:01 -05:00
Brad King 1edf138506 Tests/RunCMake: Update cmake_minimum_required versions
For policy-specific tests, use the version before the policy was
introduced.  Otherwise, use 3.5 where possible.

Also, remove `cmake_minimum_required()` and `project()` calls from
individual cases where they are handled by `CMakeLists.txt`.
2023-02-11 06:24:22 -05:00
Marc Chevrier 61075d2d7b XCode: ensure LINK_LIBRARY genex is usable with XCODE_LINK_BUILD_PHASE_MODE
Fixes: #24176
2022-11-22 16:44:45 +01:00
Gusts Kaksis ce2dee9e5b Xcode: Don't add framework as -framework argument in linker info list 2020-10-02 22:13:00 +10:00
Gusts KaksisandCraig Scott 525464ed2a Xcode: Use "Link Binary With Libraries" build phase in some cases
OBJECT and STATIC libraries (framework or non-framework) do not use
this build phase. Not all items to be linked use this build phase either.

Co-Authored-By: Craig Scott <craig.scott@crascit.com>
2020-09-01 07:38:48 +10:00