@@ -719,19 +719,21 @@ target_compile_definitions(plugdata_midi PUBLIC ${PLUGDATA_COMPILE_DEFINITIONS}
719719endif ()
720720
721721function (copy_binarydata target )
722- if (APPLE AND NOT "${target} " MATCHES "_LV2$" )
723- target_sources (${target} PRIVATE ${CMAKE_CURRENT_BINARY_DIR} /BinaryData/plugdata-resources.bin )
724- set_source_files_properties (
725- ${CMAKE_CURRENT_BINARY_DIR} /BinaryData/plugdata-resources.bin
726- PROPERTIES
727- MACOSX_PACKAGE_LOCATION "Resources"
728- )
729- else ()
730- add_custom_command (TARGET ${target} PRE_LINK
731- COMMAND ${CMAKE_COMMAND} -E copy
722+ if (TARGET ${target} )
723+ if (APPLE AND NOT "${target} " MATCHES "_LV2$" )
724+ target_sources (${target} PRIVATE ${CMAKE_CURRENT_BINARY_DIR} /BinaryData/plugdata-resources.bin )
725+ set_source_files_properties (
732726 ${CMAKE_CURRENT_BINARY_DIR} /BinaryData/plugdata-resources.bin
733- "$<TARGET_FILE_DIR :${target} >/plugdata-resources.bin"
734- )
727+ PROPERTIES
728+ MACOSX_PACKAGE_LOCATION "Resources"
729+ )
730+ else ()
731+ add_custom_command (TARGET ${target} PRE_LINK
732+ COMMAND ${CMAKE_COMMAND} -E copy
733+ ${CMAKE_CURRENT_BINARY_DIR} /BinaryData/plugdata-resources.bin
734+ "$<TARGET_FILE_DIR :${target} >/plugdata-resources.bin"
735+ )
736+ endif ()
735737 endif ()
736738endfunction ()
737739
@@ -741,17 +743,13 @@ else()
741743copy_binarydata (plugdata_standalone )
742744copy_binarydata (plugdata_VST3 )
743745copy_binarydata (plugdata_fx_VST3 )
744- copy_binarydata (plugdata_AAX )
745- copy_binarydata (plugdata_fx_AAX )
746746copy_binarydata (plugdata_CLAP )
747747copy_binarydata (plugdata_fx_CLAP )
748748copy_binarydata (plugdata_LV2 )
749749copy_binarydata (plugdata_fx_LV2 )
750- if (APPLE )
751- copy_binarydata (plugdata_AU )
752- copy_binarydata (plugdata_fx_AU )
753- copy_binarydata (plugdata_midi_AU )
754- endif ()
750+ copy_binarydata (plugdata_AU )
751+ copy_binarydata (plugdata_fx_AU )
752+ copy_binarydata (plugdata_midi_AU )
755753endif ()
756754
757755target_include_directories (plugdata_core PUBLIC ${CMAKE_CURRENT_BINARY_DIR} /BinaryData )
0 commit comments