Merge pull request #2433 from LMMS/ladspa-dirs

Fix ladspa plugin discovery
This commit is contained in:
Lukas W
2015-11-04 09:14:04 +01:00
8 changed files with 12 additions and 34 deletions

View File

@@ -1,3 +1,9 @@
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)
ADD_SUBDIRECTORY(caps)
ENDIF(WANT_CAPS)
@@ -17,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

@@ -1,5 +1,3 @@
SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/ladspa")
FILE(GLOB SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp")
ADD_LIBRARY(calf MODULE ${SOURCES})
INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}/include"

View File

@@ -1,5 +1,3 @@
SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/ladspa")
INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}/include")
FILE(GLOB SOURCES *.cc)
ADD_LIBRARY(caps MODULE ${SOURCES})

View File

@@ -1,5 +1,3 @@
SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/ladspa")
INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}/include")
FILE(GLOB_RECURSE SOURCES src/*.cpp)
ADD_LIBRARY(cmt MODULE ${SOURCES})

View File

@@ -1,5 +1,3 @@
SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/ladspa")
ADD_DEFINITIONS(-DFFTW3)
INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}/include"
"${CMAKE_CURRENT_SOURCE_DIR}"

View File

@@ -1,5 +1,3 @@
SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/ladspa")
INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}/include")
FILE(GLOB PLUGIN_SOURCES *.c)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3 -Wno-write-strings -fomit-frame-pointer -fno-strict-aliasing -fstrength-reduce -funroll-loops -ffast-math")

View File

@@ -77,17 +77,10 @@ ConfigManager::ConfigManager() :
QString line = stream.readLine();
if (line.startsWith("lmms_SOURCE_DIR:")) {
// Current source directory contains respective data directory
QString srcDir = line.section('=', -1).trimmed();
QDir::addSearchPath("data", srcDir + "/data/");
break;
}
if (line.startsWith("lmms_BINARY_DIR:")) {
// Current build directory contains respective LADSPA plugins
QString binDir = line.section('=', -1).trimmed();
m_ladDir = binDir + "/plugins/ladspa/";
m_ladDir += "," + userLadspaDir();
}
}
cmakeCache.close();
@@ -455,15 +448,7 @@ 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 = userLadspaDir();
}
#ifdef LMMS_HAVE_STK

View File

@@ -34,11 +34,15 @@
#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( ',' );