Skip to content

Commit da6ca54

Browse files
committed
LV2 fix for macOS
1 parent 3db983b commit da6ca54

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

CMakeLists.txt

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -591,6 +591,14 @@ if("${CMAKE_SYSTEM_NAME}" MATCHES "iOS")
591591
)
592592
endif()
593593

594+
function(copy_dylib_lv2 TARGET LIB_NAME PATH)
595+
add_custom_command(TARGET ${TARGET} POST_BUILD
596+
COMMAND ${CMAKE_COMMAND} -E copy_if_different
597+
"$<TARGET_FILE:${LIB_NAME}>"
598+
"${PATH}"
599+
)
600+
endfunction()
601+
594602
function(copy_dylib TARGET LIB_NAME)
595603
# Define the path to the dylib (make sure LIB_NAME has the correct path)
596604
set(LIB_PATH $<TARGET_FILE:${LIB_NAME}>)
@@ -640,8 +648,8 @@ elseif(APPLE)
640648
copy_dylib(plugdata_AU pd-multi)
641649
copy_dylib(plugdata_AUv3 pd-multi)
642650
copy_dylib(plugdata_CLAP pd-multi)
643-
#copy_dylib(plugdata_LV2 pd-multi) TODO: fix LV2!
644-
#copy_dylib(plugdata_fx_LV2 pd-multi)
651+
copy_dylib_lv2(plugdata_LV2 pd-multi ${PLUGDATA_PLUGINS_LOCATION}/LV2/plugdata.lv2)
652+
copy_dylib_lv2(plugdata_fx_LV2 pd-multi ${PLUGDATA_PLUGINS_LOCATION}/LV2/plugdata-fx.lv2)
645653
copy_dylib(plugdata_fx_VST3 pd-multi)
646654
copy_dylib(plugdata_fx_AU pd-multi)
647655
copy_dylib(plugdata_fx_AUv3 pd-multi)

0 commit comments

Comments
 (0)