Skip to content

Commit

Permalink
If MACOSX_EMBEDDED is there, use it for plist
Browse files Browse the repository at this point in the history
MACOSX_EMBEDDED_ allows you to embed a clap as a subordinate
framework of your wrapped component, but we didn't use that
handed in clap to generate the Plist. Fix that by using it
if available.
  • Loading branch information
baconpaul committed Oct 10, 2024
1 parent cdaf7ac commit 01f7565
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions cmake/wrap_auv2.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,22 @@ function(target_add_auv2_wrapper)
"$<TARGET_FILE:${clpt}>" "${AUV2_BUNDLE_VERSION}"
"${AUV2_MANUFACTURER_CODE}" "${AUV2_MANUFACTURER_NAME}"
)
elseif (DEFINED AUV2_MACOSX_EMBEDDED_CLAP_LOCATION)
message(STATUS "clap-wrapper: building auv2 based on clap ${AUV2_MACOSX_EMBEDDED_CLAP_LOCATION}")
set(AUV2_SUBTYPE_CODE "----")
set(AUV2_INSTRUMENT_TYPE "aumu")

add_custom_command(
TARGET ${bhtg}
POST_BUILD
WORKING_DIRECTORY ${bhtgoutdir}
BYPRODUCTS ${bhtgoutdir}/auv2_Info.plist ${bhtgoutdir}/generated_entrypoints.hxx
COMMAND codesign -s - -f "$<TARGET_FILE:${bhtg}>"
COMMAND $<TARGET_FILE:${bhtg}> --fromclap
"${AUV2_OUTPUT_NAME}"
"${AUV2_MACOSX_EMBEDDED_CLAP_LOCATION}" "${AUV2_BUNDLE_VERSION}"
"${AUV2_MANUFACTURER_CODE}" "${AUV2_MANUFACTURER_NAME}"
)
else ()
if (NOT DEFINED AUV2_OUTPUT_NAME)
message(FATAL_ERROR "clap-wrapper: target_add_auv2_wrapper requires an output name")
Expand Down

0 comments on commit 01f7565

Please sign in to comment.