diff --git a/.appveyor.yml b/.appveyor.yml index 7ca7d58c4ce..9b25ff5e437 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -8,7 +8,11 @@ environment: matrix: - compiler: msvc install: - - vcpkg install --triplet %PLATFORM%-windows --recurse fftw3 libsamplerate libsndfile sdl2 + - cd C:\Tools\vcpkg + - git pull + - .\bootstrap-vcpkg.bat + - cd %APPVEYOR_BUILD_FOLDER% + - vcpkg install --triplet %PLATFORM%-windows --recurse fftw3 libsamplerate libsndfile lilv lv2 sdl2 - nuget install clcache -Version 4.1.0 build_script: - cd %APPVEYOR_BUILD_FOLDER% diff --git a/CMakeLists.txt b/CMakeLists.txt index 43d7dd1523e..84fd91ee46d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -203,14 +203,19 @@ IF(WANT_LV2) IF(PKG_CONFIG_FOUND) PKG_CHECK_MODULES(LV2 lv2) PKG_CHECK_MODULES(LILV lilv-0) - IF(LV2_FOUND AND LILV_FOUND) - SET(LMMS_HAVE_LV2 TRUE) - SET(STATUS_LV2 "OK") - ELSE() - SET(STATUS_LV2 "not found, install it or set PKG_CONFIG_PATH appropriately") + ENDIF() + IF(NOT LV2_FOUND AND NOT LILV_FOUND) + FIND_PACKAGE(LV2 CONFIG) + FIND_PACKAGE(LILV CONFIG) + IF(LILV_FOUND) + SET(LILV_LIBRARIES "lilv::lilv") ENDIF() + ENDIF() + IF(LV2_FOUND AND LILV_FOUND) + SET(LMMS_HAVE_LV2 TRUE) + SET(STATUS_LV2 "OK") ELSE() - SET(STATUS_LV2 "not found, requires pkg-config") + SET(STATUS_LV2 "not found, install it or set PKG_CONFIG_PATH appropriately") ENDIF() ELSE(WANT_LV2) SET(STATUS_LV2 "not built as requested") diff --git a/include/Lv2ControlBase.h b/include/Lv2ControlBase.h index d5d83f37800..acfbea25ee4 100644 --- a/include/Lv2ControlBase.h +++ b/include/Lv2ControlBase.h @@ -33,6 +33,7 @@ #include "DataFile.h" #include "LinkedModelGroups.h" +#include "lmms_export.h" #include "Plugin.h" class Lv2Proc; @@ -65,7 +66,7 @@ class PluginIssue; * this class can not override virtuals of Instrument or EffectControls, so it will offer functions that must be called by virtuals in its child class */ -class Lv2ControlBase : public LinkedModelGroups +class LMMS_EXPORT Lv2ControlBase : public LinkedModelGroups { public: static Plugin::PluginTypes check(const LilvPlugin* m_plugin, @@ -87,7 +88,11 @@ class Lv2ControlBase : public LinkedModelGroups //! this is the same pointer as this, but a different type //! @param uri the Lv2 URI telling this class what plugin to construct Lv2ControlBase(class Model *that, const QString& uri); + Lv2ControlBase(const Lv2ControlBase&) = delete; ~Lv2ControlBase() override; + + Lv2ControlBase& operator=(const Lv2ControlBase&) = delete; + //! Must be checked after ctor or reload bool isValid() const { return m_valid; } diff --git a/include/Lv2SubPluginFeatures.h b/include/Lv2SubPluginFeatures.h index 33c29c3ef26..fee3c381216 100644 --- a/include/Lv2SubPluginFeatures.h +++ b/include/Lv2SubPluginFeatures.h @@ -33,9 +33,10 @@ #include +#include "lmms_export.h" #include "Plugin.h" -class Lv2SubPluginFeatures : public Plugin::Descriptor::SubPluginFeatures +class LMMS_EXPORT Lv2SubPluginFeatures : public Plugin::Descriptor::SubPluginFeatures { private: static const LilvPlugin *getPlugin(const Key &k); diff --git a/include/Lv2ViewBase.h b/include/Lv2ViewBase.h index 980e1f7efcf..5ccbbb75be1 100644 --- a/include/Lv2ViewBase.h +++ b/include/Lv2ViewBase.h @@ -34,6 +34,7 @@ #include #include "LinkedModelGroupViews.h" +#include "lmms_export.h" #include "Lv2Basics.h" class Lv2Proc; @@ -54,7 +55,7 @@ class Lv2ViewProc : public LinkedModelGroupView //! Base class for view for one Lv2 plugin -class Lv2ViewBase : public LinkedModelGroupsView +class LMMS_EXPORT Lv2ViewBase : public LinkedModelGroupsView { protected: //! @param pluginWidget A child class which inherits QWidget diff --git a/plugins/Lv2Effect/Lv2Effect.cpp b/plugins/Lv2Effect/Lv2Effect.cpp index 4f84104bbe9..dd0c4c44ff9 100644 --- a/plugins/Lv2Effect/Lv2Effect.cpp +++ b/plugins/Lv2Effect/Lv2Effect.cpp @@ -35,6 +35,9 @@ +extern "C" +{ + Plugin::Descriptor PLUGIN_EXPORT lv2effect_plugin_descriptor = { STRINGIFY(PLUGIN_NAME), @@ -49,6 +52,8 @@ Plugin::Descriptor PLUGIN_EXPORT lv2effect_plugin_descriptor = new Lv2SubPluginFeatures(Plugin::Effect) }; +} + diff --git a/plugins/Lv2Instrument/Lv2Instrument.cpp b/plugins/Lv2Instrument/Lv2Instrument.cpp index ca918d2ed04..d67e2549290 100644 --- a/plugins/Lv2Instrument/Lv2Instrument.cpp +++ b/plugins/Lv2Instrument/Lv2Instrument.cpp @@ -41,6 +41,9 @@ +extern "C" +{ + Plugin::Descriptor PLUGIN_EXPORT lv2instrument_plugin_descriptor = { STRINGIFY(PLUGIN_NAME), @@ -55,6 +58,8 @@ Plugin::Descriptor PLUGIN_EXPORT lv2instrument_plugin_descriptor = new Lv2SubPluginFeatures(Plugin::Instrument) }; +} + @@ -221,7 +226,7 @@ Lv2InsView::Lv2InsView(Lv2Instrument *_instrument, QWidget *_parent) : setAutoFillBackground(true); if (m_reloadPluginButton) { connect(m_reloadPluginButton, &QPushButton::clicked, - this, [this](){ castModel()->reloadPlugin();} ); + this, [this](){ this->castModel()->reloadPlugin();} ); } if (m_toggleUIButton) { connect(m_toggleUIButton, &QPushButton::toggled,