diff --git a/plugins/LadspaEffect/CMakeLists.txt b/plugins/LadspaEffect/CMakeLists.txt index 80802ec35..07d4cb0aa 100644 --- a/plugins/LadspaEffect/CMakeLists.txt +++ b/plugins/LadspaEffect/CMakeLists.txt @@ -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") - - diff --git a/plugins/LadspaEffect/calf/CMakeLists.txt b/plugins/LadspaEffect/calf/CMakeLists.txt index 06cd10f83..3bd4ae0f8 100644 --- a/plugins/LadspaEffect/calf/CMakeLists.txt +++ b/plugins/LadspaEffect/calf/CMakeLists.txt @@ -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" diff --git a/plugins/LadspaEffect/caps/CMakeLists.txt b/plugins/LadspaEffect/caps/CMakeLists.txt index f8ee888e9..cb4ce1a00 100644 --- a/plugins/LadspaEffect/caps/CMakeLists.txt +++ b/plugins/LadspaEffect/caps/CMakeLists.txt @@ -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}) diff --git a/plugins/LadspaEffect/cmt/CMakeLists.txt b/plugins/LadspaEffect/cmt/CMakeLists.txt index 215761638..81bb13dc2 100644 --- a/plugins/LadspaEffect/cmt/CMakeLists.txt +++ b/plugins/LadspaEffect/cmt/CMakeLists.txt @@ -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}) diff --git a/plugins/LadspaEffect/swh/CMakeLists.txt b/plugins/LadspaEffect/swh/CMakeLists.txt index c5699525c..e140b1793 100644 --- a/plugins/LadspaEffect/swh/CMakeLists.txt +++ b/plugins/LadspaEffect/swh/CMakeLists.txt @@ -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}" diff --git a/plugins/LadspaEffect/tap/CMakeLists.txt b/plugins/LadspaEffect/tap/CMakeLists.txt index 71dc668ef..499dbf046 100644 --- a/plugins/LadspaEffect/tap/CMakeLists.txt +++ b/plugins/LadspaEffect/tap/CMakeLists.txt @@ -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") diff --git a/src/core/ConfigManager.cpp b/src/core/ConfigManager.cpp index 73db610bb..114a12202 100644 --- a/src/core/ConfigManager.cpp +++ b/src/core/ConfigManager.cpp @@ -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 diff --git a/src/core/LadspaManager.cpp b/src/core/LadspaManager.cpp index a397efc86..cd3fee9ac 100644 --- a/src/core/LadspaManager.cpp +++ b/src/core/LadspaManager.cpp @@ -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( ',' );