Browse Source

CMake: Warn if bundle ID contains spaces

v7.0.9
reuk 3 years ago
parent
commit
10baaa420b
No known key found for this signature in database GPG Key ID: 9ADCD339CFC98A11
2 changed files with 7 additions and 1 deletions
  1. +1
    -1
      docs/CMake API.md
  2. +6
    -0
      extras/Build/CMake/JUCEUtils.cmake

+ 1
- 1
docs/CMake API.md View File

@@ -266,7 +266,7 @@ attributes directly to these creation functions, rather than adding them later.
`BUNDLE_ID`
- An identifier string in the form "com.yourcompany.productname" which should uniquely identify
this target. Mainly used for macOS builds. If not specified, a default will be generated using
the target's `COMPANY_NAME` and `PRODUCT_NAME`.
the target's `COMPANY_NAME` and the name of the CMake target.

`MICROPHONE_PERMISSION_ENABLED`
- May be either TRUE or FALSE. Adds the appropriate entries to an app's Info.plist.


+ 6
- 0
extras/Build/CMake/JUCEUtils.cmake View File

@@ -1297,6 +1297,12 @@ function(_juce_set_fallback_properties target)
get_target_property(real_company_name ${target} JUCE_COMPANY_NAME)
_juce_set_property_if_not_set(${target} BUNDLE_ID "com.${real_company_name}.${target}")

get_target_property(applied_bundle_id ${target} JUCE_BUNDLE_ID)

if("${applied_bundle_id}" MATCHES ".* .*")
message(WARNING "Target ${target} has JUCE_BUNDLE_ID '${applied_bundle_id}', which contains spaces. Use the BUNDLE_ID option to specify a valid ID.")
endif()

_juce_set_property_if_not_set(${target} VERSION ${PROJECT_VERSION})

get_target_property(final_version ${target} JUCE_VERSION)


Loading…
Cancel
Save