Skip to content

Commit

Permalink
create hierarchy to run LV2 without installing
Browse files Browse the repository at this point in the history
  • Loading branch information
jpcima committed Apr 15, 2018
1 parent c349152 commit 28209af
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 5 deletions.
18 changes: 13 additions & 5 deletions CMakeLists.txt
Expand Up @@ -107,14 +107,22 @@ if(ADLplug_LV2)
add_plugin(ADLplug_LV2)
target_link_libraries(ADLplug_LV2 PRIVATE juce_audio_plugin_client_LV2 ADLplug_core)
require_symbols(ADLplug_LV2 "lv2_generate_ttl" "lv2_descriptor" "lv2ui_descriptor")
set_property(TARGET ADLplug_LV2
PROPERTY LIBRARY_OUTPUT_DIRECTORY "lv2/ADLplug.lv2")

set(ADLplug_LV2_INSTALL_DIR "lib/lv2/ADLplug.git")
install(TARGETS ADLplug_LV2 DESTINATION "${ADLplug_LV2_INSTALL_DIR}")
install(FILES
set(ADLplug_LV2_MANIFESTS
"resources/lv2/ADLplug_LV2.ttl"
"resources/lv2/manifest.ttl"
"resources/lv2/presets.ttl"
DESTINATION "${ADLplug_LV2_INSTALL_DIR}")
"resources/lv2/presets.ttl")
add_custom_target(ADLplug_LV2_manifests_copy ALL
COMMAND "${CMAKE_COMMAND}" "-E" "make_directory" "${CMAKE_CURRENT_BINARY_DIR}/lv2/ADLplug.lv2/"
COMMAND "${CMAKE_COMMAND}" "-E" "copy" ${ADLplug_LV2_MANIFESTS} "${CMAKE_CURRENT_BINARY_DIR}/lv2/ADLplug.lv2/"
DEPENDS ${ADLplug_LV2_MANIFESTS}
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}")

set(ADLplug_LV2_INSTALL_DIR "lib/lv2/ADLplug.lv2")
install(TARGETS ADLplug_LV2 DESTINATION "${ADLplug_LV2_INSTALL_DIR}")
install(FILES ${ADLplug_LV2_MANIFESTS} DESTINATION "${ADLplug_LV2_INSTALL_DIR}")
endif()

if(ADLplug_Standalone)
Expand Down
11 changes: 11 additions & 0 deletions scripts/run-lv2.sh
@@ -0,0 +1,11 @@
#!/bin/sh -e

test -z "$JALV" && JALV=jalv.gtk3

absdir() {
old=`pwd`; cd "$1"; new=`pwd`; cd "$old"; echo "$new"
}

build_location="`dirname "$0"`/../build"
export LV2_PATH=`absdir "$build_location/lv2"`
exec "$JALV" "https://github.com/jpcima/ADLplug"

0 comments on commit 28209af

Please sign in to comment.