Skip to content

Commit 1601c52

Browse files
committed
Compilation fix
1 parent a84b28b commit 1601c52

1 file changed

Lines changed: 17 additions & 19 deletions

File tree

CMakeLists.txt

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -719,19 +719,21 @@ target_compile_definitions(plugdata_midi PUBLIC ${PLUGDATA_COMPILE_DEFINITIONS}
719719
endif()
720720

721721
function(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()
736738
endfunction()
737739

@@ -741,17 +743,13 @@ else()
741743
copy_binarydata(plugdata_standalone)
742744
copy_binarydata(plugdata_VST3)
743745
copy_binarydata(plugdata_fx_VST3)
744-
copy_binarydata(plugdata_AAX)
745-
copy_binarydata(plugdata_fx_AAX)
746746
copy_binarydata(plugdata_CLAP)
747747
copy_binarydata(plugdata_fx_CLAP)
748748
copy_binarydata(plugdata_LV2)
749749
copy_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)
755753
endif()
756754

757755
target_include_directories(plugdata_core PUBLIC ${CMAKE_CURRENT_BINARY_DIR}/BinaryData)

0 commit comments

Comments
 (0)