• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

OSGeo / gdal / 22554086173

01 Mar 2026 10:17PM UTC coverage: 71.845% (+0.002%) from 71.843%
22554086173

push

github

web-flow
CMake: MacOSX framework build fix (#13945)

* CMake/helpers/GdalVersion: fix MacOS framework build with BYPRODUCTS in custom target

In a standard build the compiler finds
`gcore/gdal_version_full/gdal_version.h` implicitly from the
search directory.

In a framework build the file must be copied into the app bundle.
However, because Ninja is strict, it refuses to do so unless the file
is explicitely associated with a rule known to create it.

See the below error when building with `GDAL_ENABLE_MACOSX_FRAMEWORK`:

`ninja: error: 'gcore/gdal_version_full/gdal_version.h', needed by 'gdal.framework/Versions/3.13/Headers/gdal_version.h', missing and no known rule to make it`

`BYPRODUCTS` explicitely registers the header as a byproduct of the
custom CMake target so that Ninja has an associated rule with it.

Further reading:

 - https://cmake.org/cmake/help/latest/command/add_custom_target.html
 - https://cmake.org/cmake/help/latest/policy/CMP0058.html

* CMake/gdal.cmake: comply with Apple metadata policy when building MacOS framework

When `GDAL_ENABLE_MACOSX_FRAMEWORK` is used, the framework produced by
Cmake does not comply with the requirements set by the Apple
documentation.

The CMake target properties `MACOSX_FRAMEWORK_SHORT_VERSION_STRING` and
`MACOSX_FRAMEWORK_BUNDLE_VERSION`, which map respectively to
`CFBundleShortVersionString` and `CFBundleVersion` in the produced
`Info.plist` of the framework, must respect the following guidelines:

- `CFBundleShortVersionString`: "This key is a user-visible string for
  the version of the bundle. The required format is three
  period-separated integers, such as 10.14.1. The string can only
  contain numeric characters (0-9) and periods."
  Source: https://developer.apple.com/documentation/bundleresources/information-property-list/cfbundleshortversionstring

- `CFBundleVersion`: "This key is a machine-readable string composed of
  one to three period-separated integers, such as 10.14.1. The string
  can only... (continued)

610137 of 849244 relevant lines covered (71.84%)

320125.46 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

70.9
/port/cpl_error.cpp


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc