Carla: Fix link (rpath) and finding binary dir (needs latest carla)

This commit is contained in:
falkTX
2014-09-16 17:22:23 +01:00
parent 849d08c6ef
commit b88225ffc8
2 changed files with 21 additions and 8 deletions

View File

@@ -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)

View File

@@ -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);