diff --git a/plugins/carlabase/CMakeLists.txt b/plugins/carlabase/CMakeLists.txt index c23082ba6..82c31dbd0 100644 --- a/plugins/carlabase/CMakeLists.txt +++ b/plugins/carlabase/CMakeLists.txt @@ -1,7 +1,12 @@ if(LMMS_HAVE_CARLA) - INCLUDE(BuildPlugin) - INCLUDE_DIRECTORIES(${CARLA_INCLUDE_DIRS}) - LINK_DIRECTORIES(${CARLA_LIBRARY_DIRS}) - LINK_LIBRARIES(${CARLA_LIBRARIES}) - BUILD_PLUGIN(carlabase carla.cpp carla.h MOCFILES carla.h) + INCLUDE(BuildPlugin) + INCLUDE_DIRECTORIES(${CARLA_INCLUDE_DIRS}) + LINK_DIRECTORIES(${CARLA_LIBRARY_DIRS}) + LINK_LIBRARIES(${CARLA_LIBRARIES}) + BUILD_PLUGIN(carlabase carla.cpp carla.h MOCFILES carla.h) + SET_TARGET_PROPERTIES(carlabase + PROPERTIES SKIP_BUILD_RPATH TRUE + BUILD_WITH_INSTALL_RPATH TRUE + INSTALL_RPATH_USE_LINK_PATH TRUE + INSTALL_RPATH "${CARLA_RPATH}") endif(LMMS_HAVE_CARLA) diff --git a/plugins/carlabase/carla.cpp b/plugins/carlabase/carla.cpp index b46a8d626..ec5cff9e2 100644 --- a/plugins/carlabase/carla.cpp +++ b/plugins/carlabase/carla.cpp @@ -25,7 +25,7 @@ #include "carla.h" #define REAL_BUILD // FIXME this shouldn't be needed -#include "CarlaDefines.h" +#include "CarlaHost.h" #include "engine.h" #include "InstrumentPlayHandle.h" @@ -115,10 +115,18 @@ CarlaInstrument::CarlaInstrument(InstrumentTrack* const instrumentTrack, const D fMidiEventCount(0) { fHost.handle = this; - fHost.resourceDir = strdup("/usr/share/carla/resources/"); // TODO fHost.uiName = NULL; fHost.uiParentId = 0; + // figure out prefix from dll filename + QString dllName(carla_get_library_filename()); + +#if defined(CARLA_OS_LINUX) + fHost.resourceDir = strdup(QString(dllName.split("/lib/carla")[0] + "/share/carla/resources/").toUtf8().constData()); +#else + fHost.resourceDir = NULL; +#endif + fHost.get_buffer_size = host_get_buffer_size; fHost.get_sample_rate = host_get_sample_rate; fHost.is_offline = host_is_offline; @@ -421,7 +429,7 @@ CarlaInstrumentView::CarlaInstrumentView(CarlaInstrument* const instrument, QWid : InstrumentView(instrument, parent), fHandle(instrument->fHandle), fDescriptor(instrument->fDescriptor), - fTimerId(fHandle != NULL && fDescriptor->ui_idle != NULL ? startTimer(50) : 0) + fTimerId(fHandle != NULL && fDescriptor->ui_idle != NULL ? startTimer(30) : 0) { setAutoFillBackground(true);