Fix ladspa plugin discovery

This commit is contained in:
Lukas W
2015-10-30 22:53:28 +01:00
parent 81a2fe5e69
commit 45cafd3f60
3 changed files with 10 additions and 17 deletions

View File

@@ -1,3 +1,7 @@
INCLUDE(BuildPlugin)
BUILD_PLUGIN(ladspaeffect LadspaEffect.cpp LadspaControls.cpp LadspaControlDialog.cpp LadspaSubPluginFeatures.cpp LadspaEffect.h LadspaControls.h LadspaControlDialog.h LadspaSubPluginFeatures.h MOCFILES LadspaEffect.h LadspaControls.h LadspaControlDialog.h EMBEDDED_RESOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.png")
SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/ladspa")
IF(WANT_CAPS)
@@ -19,10 +23,3 @@ ENDIF(WANT_CMT)
IF(WANT_CALF)
ADD_SUBDIRECTORY(calf)
ENDIF(WANT_CALF)
INCLUDE(BuildPlugin)
BUILD_PLUGIN(ladspaeffect LadspaEffect.cpp LadspaControls.cpp LadspaControlDialog.cpp LadspaSubPluginFeatures.cpp LadspaEffect.h LadspaControls.h LadspaControlDialog.h LadspaSubPluginFeatures.h MOCFILES LadspaEffect.h LadspaControls.h LadspaControlDialog.h EMBEDDED_RESOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.png")

View File

@@ -448,15 +448,8 @@ void ConfigManager::loadConfigFile()
if( m_ladDir.isEmpty() )
{
#if defined(LMMS_BUILD_WIN32)
m_ladDir = qApp->applicationDirPath() + "/plugins/ladspa" + QDir::separator();
#elif defined(LMMS_BUILD_APPLE)
m_ladDir = qApp->applicationDirPath() + "/../lib/lmms/ladspa/";
#else
m_ladDir = qApp->applicationDirPath() + '/' + LIB_DIR + "/lmms/ladspa/";
#endif
m_ladDir = QDir::cleanPath( m_ladDir );
m_ladDir += ","+userLadspaDir();
m_ladDir = "plugins:ladspa/";
m_ladDir = ","+userLadspaDir();
}
#ifdef LMMS_HAVE_STK

View File

@@ -34,16 +34,19 @@
#include "ConfigManager.h"
#include "LadspaManager.h"
#include "PluginFactory.h"
LadspaManager::LadspaManager()
{
// Make sure plugin search paths are set up
PluginFactory::instance();
QStringList ladspaDirectories = QString( getenv( "LADSPA_PATH" ) ).
split( LADSPA_PATH_SEPERATOR );
ladspaDirectories += ConfigManager::inst()->ladspaDir().split( ',' );
ladspaDirectories.push_back( "plugins:ladspa" );
#ifndef LMMS_BUILD_WIN32
ladspaDirectories.push_back( qApp->applicationDirPath() + '/' + LIB_DIR + "ladspa" );
ladspaDirectories.push_back( "/usr/lib/ladspa" );