From 966bf1c6de97cbcf67457f16e5dc8ce5d227699a Mon Sep 17 00:00:00 2001 From: Lukas W Date: Fri, 24 Nov 2017 21:00:51 +0100 Subject: [PATCH] Use CMake GenerateExportHeader --- CMakeLists.txt | 1 + cmake/modules/BuildPlugin.cmake | 15 +++++- include/AutomatableButton.h | 4 +- include/AutomatableModel.h | 10 ++-- include/AutomatableModelView.h | 5 +- include/AutomationPattern.h | 2 +- include/BBTrack.h | 2 +- include/BBTrackContainer.h | 2 +- include/BandLimitedWave.h | 4 +- include/BufferManager.h | 4 +- include/CaptionMenu.h | 4 +- include/ComboBox.h | 2 +- include/ComboBoxModel.h | 2 +- include/ConfigManager.h | 4 +- include/Controller.h | 4 +- include/ControllerConnection.h | 2 +- include/DataFile.h | 6 +-- include/Effect.h | 2 +- include/EffectChain.h | 2 +- include/EffectControlDialog.h | 2 +- include/Engine.h | 4 +- include/EnvelopeAndLfoParameters.h | 2 +- include/ExportFilter.h | 2 +- include/Fader.h | 2 +- include/FileDialog.h | 4 +- include/FxMixer.h | 2 +- include/FxMixerView.h | 2 +- include/Graph.h | 4 +- include/GuiApplication.h | 4 +- include/ImportFilter.h | 2 +- include/Instrument.h | 4 +- include/InstrumentPlayHandle.h | 4 +- include/InstrumentTrack.h | 2 +- include/InstrumentView.h | 2 +- include/JournallingObject.h | 2 +- include/Knob.h | 2 +- include/Ladspa2LMMS.h | 2 +- include/LadspaControl.h | 2 +- include/LadspaControlView.h | 2 +- include/LadspaManager.h | 4 +- include/LcdSpinBox.h | 2 +- include/LcdWidget.h | 4 +- include/LedCheckbox.h | 2 +- include/LmmsPalette.h | 4 +- include/MainWindow.h | 2 +- include/MemoryManager.h | 4 +- include/MidiTime.h | 6 +-- include/Mixer.h | 2 +- include/Model.h | 4 +- include/ModelView.h | 2 +- include/Note.h | 2 +- include/NotePlayHandle.h | 2 +- include/Oscillator.h | 2 +- include/Pattern.h | 2 +- include/PeakController.h | 2 +- include/PixmapButton.h | 2 +- include/PlayHandle.h | 4 +- include/Plugin.h | 4 +- include/PluginFactory.h | 4 +- include/PluginView.h | 2 +- include/PresetPreviewPlayHandle.h | 2 +- include/ProjectNotes.h | 2 +- include/ProjectRenderer.h | 3 +- include/RemotePlugin.h | 10 ++-- include/RingBuffer.h | 2 +- include/SampleBuffer.h | 6 +-- include/SerializingObject.h | 4 +- include/Song.h | 2 +- include/StringPairDrag.h | 4 +- include/SubWindow.h | 4 +- include/TabBar.h | 4 +- include/TempoSyncKnob.h | 2 +- include/TempoSyncKnobModel.h | 2 +- include/TextFloat.h | 4 +- include/ToolPlugin.h | 2 +- include/ToolPluginView.h | 2 +- include/ToolTip.h | 4 +- include/Track.h | 2 +- include/TrackContainer.h | 2 +- include/ValueBuffer.h | 4 +- include/embed.h | 6 +-- include/export.h | 46 ------------------- include/fft_helpers.h | 14 +++--- plugins/Amplifier/Amplifier.cpp | 2 +- plugins/BassBooster/BassBooster.cpp | 2 +- plugins/Bitcrush/Bitcrush.cpp | 1 + plugins/CrossoverEQ/CrossoverEQ.cpp | 1 + plugins/Delay/DelayEffect.cpp | 2 +- plugins/DualFilter/DualFilter.cpp | 2 +- plugins/Eq/EqEffect.cpp | 3 +- plugins/Flanger/FlangerEffect.cpp | 2 + plugins/FreeBoy/FreeBoy.cpp | 2 + plugins/HydrogenImport/HydrogenImport.cpp | 2 + plugins/MidiExport/MidiExport.cpp | 1 + plugins/MidiImport/MidiImport.cpp | 4 +- plugins/MultitapEcho/MultitapEcho.cpp | 2 +- plugins/OpulenZ/OpulenZ.cpp | 2 + plugins/SpectrumAnalyzer/SpectrumAnalyzer.cpp | 2 +- .../audio_file_processor.cpp | 2 +- plugins/bit_invader/bit_invader.cpp | 2 + .../dynamics_processor/dynamics_processor.cpp | 1 + plugins/kicker/kicker.cpp | 2 +- plugins/ladspa_browser/ladspa_browser.cpp | 2 +- plugins/lb302/lb302.cpp | 2 +- plugins/nes/Nes.cpp | 1 + plugins/patman/patman.cpp | 2 +- .../peak_controller_effect.cpp | 1 + plugins/sfxr/sfxr.cpp | 2 + plugins/stereo_enhancer/stereo_enhancer.cpp | 2 +- plugins/stereo_matrix/stereo_matrix.cpp | 2 +- .../triple_oscillator/TripleOscillator.cpp | 2 +- plugins/watsyn/Watsyn.cpp | 1 + plugins/waveshaper/waveshaper.cpp | 1 + src/CMakeLists.txt | 12 +++++ 114 files changed, 196 insertions(+), 195 deletions(-) delete mode 100644 include/export.h diff --git a/CMakeLists.txt b/CMakeLists.txt index a9c4404cb..2dbdf3963 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,6 +19,7 @@ INCLUDE(CheckSubmodules) INCLUDE(AddFileDependencies) INCLUDE(CheckIncludeFiles) INCLUDE(FindPkgConfig) +INCLUDE(GenerateExportHeader) STRING(TOUPPER "${CMAKE_PROJECT_NAME}" PROJECT_NAME_UCASE) diff --git a/cmake/modules/BuildPlugin.cmake b/cmake/modules/BuildPlugin.cmake index a527b8472..d0e3fa17a 100644 --- a/cmake/modules/BuildPlugin.cmake +++ b/cmake/modules/BuildPlugin.cmake @@ -6,7 +6,7 @@ INCLUDE(GenQrc) MACRO(BUILD_PLUGIN PLUGIN_NAME) - CMAKE_PARSE_ARGUMENTS(PLUGIN "" "" "MOCFILES;EMBEDDED_RESOURCES;UICFILES;LINK" ${ARGN}) + CMAKE_PARSE_ARGUMENTS(PLUGIN "" "LINK;EXPORT_BASE_NAME" "MOCFILES;EMBEDDED_RESOURCES;UICFILES" ${ARGN}) SET(PLUGIN_SOURCES ${PLUGIN_UNPARSED_ARGUMENTS}) INCLUDE_DIRECTORIES("${CMAKE_CURRENT_BINARY_DIR}" "${CMAKE_BINARY_DIR}" "${CMAKE_SOURCE_DIR}/include") @@ -62,7 +62,7 @@ MACRO(BUILD_PLUGIN PLUGIN_NAME) TARGET_LINK_LIBRARIES(${PLUGIN_NAME} lmms) ENDIF(LMMS_BUILD_WIN32) - INSTALL(TARGETS ${PLUGIN_NAME} LIBRARY DESTINATION "${PLUGIN_DIR}") + INSTALL(TARGETS ${PLUGIN_NAME} DESTINATION "${PLUGIN_DIR}") IF(LMMS_BUILD_APPLE) SET_TARGET_PROPERTIES(${PLUGIN_NAME} PROPERTIES LINK_FLAGS "-bundle_loader \"${CMAKE_BINARY_DIR}/lmms\"") @@ -74,5 +74,16 @@ MACRO(BUILD_PLUGIN PLUGIN_NAME) ENDIF() SET_DIRECTORY_PROPERTIES(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "${RCC_OUT} ${plugin_MOC_out}") + + IF(NOT PLUGIN_EXPORT_BASE_NAME) + SET(PLUGIN_EXPORT_BASE_NAME "PLUGIN") + ENDIF() + + GENERATE_EXPORT_HEADER(${PLUGIN_NAME} + BASE_NAME ${PLUGIN_EXPORT_BASE_NAME} + ) + TARGET_INCLUDE_DIRECTORIES(${PLUGIN_NAME} + PUBLIC $ + ) ENDMACRO(BUILD_PLUGIN) diff --git a/include/AutomatableButton.h b/include/AutomatableButton.h index 014f1eed8..578063f16 100644 --- a/include/AutomatableButton.h +++ b/include/AutomatableButton.h @@ -34,7 +34,7 @@ class automatableButtonGroup; -class EXPORT AutomatableButton : public QPushButton, public BoolModelView +class LMMS_EXPORT AutomatableButton : public QPushButton, public BoolModelView { Q_OBJECT public: @@ -79,7 +79,7 @@ private: -class EXPORT automatableButtonGroup : public QWidget, public IntModelView +class LMMS_EXPORT automatableButtonGroup : public QWidget, public IntModelView { Q_OBJECT public: diff --git a/include/AutomatableModel.h b/include/AutomatableModel.h index b04f3da9c..8dbe80efd 100644 --- a/include/AutomatableModel.h +++ b/include/AutomatableModel.h @@ -63,7 +63,7 @@ class ControllerConnection; -class EXPORT AutomatableModel : public Model, public JournallingObject +class LMMS_EXPORT AutomatableModel : public Model, public JournallingObject { Q_OBJECT MM_OPERATORS @@ -349,7 +349,7 @@ signals: -template class EXPORT TypedAutomatableModel : public AutomatableModel +template class LMMS_EXPORT TypedAutomatableModel : public AutomatableModel { public: using AutomatableModel::AutomatableModel; @@ -377,7 +377,7 @@ public: // some typed AutomatableModel-definitions -class EXPORT FloatModel : public TypedAutomatableModel +class LMMS_EXPORT FloatModel : public TypedAutomatableModel { Q_OBJECT public: @@ -394,7 +394,7 @@ public: } ; -class EXPORT IntModel : public TypedAutomatableModel +class LMMS_EXPORT IntModel : public TypedAutomatableModel { Q_OBJECT public: @@ -409,7 +409,7 @@ public: } ; -class EXPORT BoolModel : public TypedAutomatableModel +class LMMS_EXPORT BoolModel : public TypedAutomatableModel { Q_OBJECT public: diff --git a/include/AutomatableModelView.h b/include/AutomatableModelView.h index 3b320434f..964ffdc5d 100644 --- a/include/AutomatableModelView.h +++ b/include/AutomatableModelView.h @@ -32,7 +32,7 @@ class QMenu; class QMouseEvent; -class EXPORT AutomatableModelView : public ModelView +class LMMS_EXPORT AutomatableModelView : public ModelView { public: AutomatableModelView( Model* model, QWidget* _this ); @@ -106,7 +106,7 @@ protected: -template class EXPORT TypedModelView : public AutomatableModelView +template class LMMS_EXPORT TypedModelView : public AutomatableModelView { public: TypedModelView( Model* model, QWidget* _this) : @@ -127,6 +127,5 @@ using FloatModelView = TypedModelView; using IntModelView = TypedModelView; using BoolModelView = TypedModelView; - #endif diff --git a/include/AutomationPattern.h b/include/AutomationPattern.h index 89dcfed7c..070b6c669 100644 --- a/include/AutomationPattern.h +++ b/include/AutomationPattern.h @@ -38,7 +38,7 @@ class MidiTime; -class EXPORT AutomationPattern : public TrackContentObject +class LMMS_EXPORT AutomationPattern : public TrackContentObject { Q_OBJECT public: diff --git a/include/BBTrack.h b/include/BBTrack.h index 9e72c4f04..a906b54d2 100644 --- a/include/BBTrack.h +++ b/include/BBTrack.h @@ -125,7 +125,7 @@ private: -class EXPORT BBTrack : public Track +class LMMS_EXPORT BBTrack : public Track { Q_OBJECT public: diff --git a/include/BBTrackContainer.h b/include/BBTrackContainer.h index 0ac84b6d3..236325157 100644 --- a/include/BBTrackContainer.h +++ b/include/BBTrackContainer.h @@ -30,7 +30,7 @@ #include "ComboBoxModel.h" -class EXPORT BBTrackContainer : public TrackContainer +class LMMS_EXPORT BBTrackContainer : public TrackContainer { Q_OBJECT mapPropertyFromModel(int,currentBB,setCurrentBB,m_bbComboBoxModel); diff --git a/include/BandLimitedWave.h b/include/BandLimitedWave.h index 55f6e482c..386713328 100644 --- a/include/BandLimitedWave.h +++ b/include/BandLimitedWave.h @@ -29,7 +29,7 @@ class QDataStream; class QString; -#include "export.h" +#include "lmms_export.h" #include "interpolation.h" #include "lmms_basics.h" #include "lmms_math.h" @@ -82,7 +82,7 @@ QDataStream& operator>> ( QDataStream &in, WaveMipMap &waveMipMap ); -class EXPORT BandLimitedWave +class LMMS_EXPORT BandLimitedWave { public: enum Waveforms diff --git a/include/BufferManager.h b/include/BufferManager.h index 97c553ac9..20390644b 100644 --- a/include/BufferManager.h +++ b/include/BufferManager.h @@ -26,10 +26,10 @@ #ifndef BUFFER_MANAGER_H #define BUFFER_MANAGER_H -#include "export.h" +#include "lmms_export.h" #include "lmms_basics.h" -class EXPORT BufferManager +class LMMS_EXPORT BufferManager { public: static void init( fpp_t framesPerPeriod ); diff --git a/include/CaptionMenu.h b/include/CaptionMenu.h index 01aa3ca5e..e6531fe31 100644 --- a/include/CaptionMenu.h +++ b/include/CaptionMenu.h @@ -28,12 +28,12 @@ #include -#include "export.h" +#include "lmms_export.h" /// /// \brief A context menu with a caption /// -class EXPORT CaptionMenu : public QMenu +class LMMS_EXPORT CaptionMenu : public QMenu { Q_OBJECT public: diff --git a/include/ComboBox.h b/include/ComboBox.h index 99f7f8750..927c87620 100644 --- a/include/ComboBox.h +++ b/include/ComboBox.h @@ -34,7 +34,7 @@ -class EXPORT ComboBox : public QWidget, public IntModelView +class LMMS_EXPORT ComboBox : public QWidget, public IntModelView { Q_OBJECT public: diff --git a/include/ComboBoxModel.h b/include/ComboBoxModel.h index e4088679f..ad3603759 100644 --- a/include/ComboBoxModel.h +++ b/include/ComboBoxModel.h @@ -33,7 +33,7 @@ #include "embed.h" -class EXPORT ComboBoxModel : public IntModel +class LMMS_EXPORT ComboBoxModel : public IntModel { Q_OBJECT public: diff --git a/include/ConfigManager.h b/include/ConfigManager.h index 997d7f24c..dc5b9f485 100644 --- a/include/ConfigManager.h +++ b/include/ConfigManager.h @@ -34,7 +34,7 @@ #include #include -#include "export.h" +#include "lmms_export.h" class LmmsCore; @@ -51,7 +51,7 @@ const QString TRACK_ICON_PATH = "track_icons/"; const QString LOCALE_PATH = "locale/"; -class EXPORT ConfigManager : public QObject +class LMMS_EXPORT ConfigManager : public QObject { Q_OBJECT public: diff --git a/include/Controller.h b/include/Controller.h index 89a5e9371..d4fb94731 100644 --- a/include/Controller.h +++ b/include/Controller.h @@ -27,7 +27,7 @@ #ifndef CONTROLLER_H #define CONTROLLER_H -#include "export.h" +#include "lmms_export.h" #include "Engine.h" #include "Model.h" #include "JournallingObject.h" @@ -41,7 +41,7 @@ class ControllerConnection; typedef QVector ControllerVector; -class EXPORT Controller : public Model, public JournallingObject +class LMMS_EXPORT Controller : public Model, public JournallingObject { Q_OBJECT public: diff --git a/include/ControllerConnection.h b/include/ControllerConnection.h index e9cd543cb..5c4d5f20e 100644 --- a/include/ControllerConnection.h +++ b/include/ControllerConnection.h @@ -42,7 +42,7 @@ class ControllerConnection; typedef QVector ControllerConnectionVector; -class EXPORT ControllerConnection : public QObject, public JournallingObject +class LMMS_EXPORT ControllerConnection : public QObject, public JournallingObject { Q_OBJECT public: diff --git a/include/DataFile.h b/include/DataFile.h index 9e4ca13e3..5c634a6fa 100644 --- a/include/DataFile.h +++ b/include/DataFile.h @@ -29,12 +29,12 @@ #include -#include "export.h" +#include "lmms_export.h" #include "MemoryManager.h" class QTextStream; -class EXPORT DataFile : public QDomDocument +class LMMS_EXPORT DataFile : public QDomDocument { MM_OPERATORS public: @@ -134,7 +134,7 @@ private: void loadData( const QByteArray & _data, const QString & _sourceFile ); - struct EXPORT typeDescStruct + struct LMMS_EXPORT typeDescStruct { Type m_type; QString m_name; diff --git a/include/Effect.h b/include/Effect.h index 2147ab1c5..d6aa04d97 100644 --- a/include/Effect.h +++ b/include/Effect.h @@ -37,7 +37,7 @@ class EffectChain; class EffectControls; -class EXPORT Effect : public Plugin +class LMMS_EXPORT Effect : public Plugin { MM_OPERATORS Q_OBJECT diff --git a/include/EffectChain.h b/include/EffectChain.h index 5397fe81c..bc1e7df8c 100644 --- a/include/EffectChain.h +++ b/include/EffectChain.h @@ -33,7 +33,7 @@ class Effect; -class EXPORT EffectChain : public Model, public SerializingObject +class LMMS_EXPORT EffectChain : public Model, public SerializingObject { Q_OBJECT public: diff --git a/include/EffectControlDialog.h b/include/EffectControlDialog.h index d139de173..712f31217 100644 --- a/include/EffectControlDialog.h +++ b/include/EffectControlDialog.h @@ -33,7 +33,7 @@ class EffectControls; -class EXPORT EffectControlDialog : public QWidget, public ModelView +class LMMS_EXPORT EffectControlDialog : public QWidget, public ModelView { Q_OBJECT public: diff --git a/include/Engine.h b/include/Engine.h index 2f940dfbf..fc2547996 100644 --- a/include/Engine.h +++ b/include/Engine.h @@ -30,7 +30,7 @@ #include -#include "export.h" +#include "lmms_export.h" class BBTrackContainer; class DummyTrackContainer; @@ -53,7 +53,7 @@ class Ladspa2LMMS; class LmmsCore; typedef LmmsCore Engine; -class EXPORT LmmsCore : public QObject +class LMMS_EXPORT LmmsCore : public QObject { Q_OBJECT public: diff --git a/include/EnvelopeAndLfoParameters.h b/include/EnvelopeAndLfoParameters.h index 747bb94c2..4824062f3 100644 --- a/include/EnvelopeAndLfoParameters.h +++ b/include/EnvelopeAndLfoParameters.h @@ -34,7 +34,7 @@ #include "lmms_basics.h" -class EXPORT EnvelopeAndLfoParameters : public Model, public JournallingObject +class LMMS_EXPORT EnvelopeAndLfoParameters : public Model, public JournallingObject { Q_OBJECT public: diff --git a/include/ExportFilter.h b/include/ExportFilter.h index 35416f492..950bacbcd 100644 --- a/include/ExportFilter.h +++ b/include/ExportFilter.h @@ -32,7 +32,7 @@ #include "Plugin.h" -class EXPORT ExportFilter : public Plugin +class LMMS_EXPORT ExportFilter : public Plugin { public: ExportFilter( const Descriptor * _descriptor ) : Plugin( _descriptor, NULL ) {} diff --git a/include/Fader.h b/include/Fader.h index 80359b4c6..018f66e0c 100644 --- a/include/Fader.h +++ b/include/Fader.h @@ -57,7 +57,7 @@ class TextFloat; -class EXPORT Fader : public QWidget, public FloatModelView +class LMMS_EXPORT Fader : public QWidget, public FloatModelView { Q_OBJECT public: diff --git a/include/FileDialog.h b/include/FileDialog.h index 0cade9967..c3db2393d 100644 --- a/include/FileDialog.h +++ b/include/FileDialog.h @@ -28,9 +28,9 @@ #include -#include "export.h" +#include "lmms_export.h" -class EXPORT FileDialog : public QFileDialog +class LMMS_EXPORT FileDialog : public QFileDialog { Q_OBJECT public: diff --git a/include/FxMixer.h b/include/FxMixer.h index 053480a6a..2c7ef3c5a 100644 --- a/include/FxMixer.h +++ b/include/FxMixer.h @@ -121,7 +121,7 @@ class FxRoute : public QObject }; -class EXPORT FxMixer : public Model, public JournallingObject +class LMMS_EXPORT FxMixer : public Model, public JournallingObject { Q_OBJECT public: diff --git a/include/FxMixerView.h b/include/FxMixerView.h index 30c759838..9b07637ed 100644 --- a/include/FxMixerView.h +++ b/include/FxMixerView.h @@ -41,7 +41,7 @@ class QButtonGroup; class FxLine; -class EXPORT FxMixerView : public QWidget, public ModelView, +class LMMS_EXPORT FxMixerView : public QWidget, public ModelView, public SerializingObjectHook { Q_OBJECT diff --git a/include/Graph.h b/include/Graph.h index dc1d1fe16..b6de16371 100644 --- a/include/Graph.h +++ b/include/Graph.h @@ -38,7 +38,7 @@ class graphModel; -class EXPORT Graph : public QWidget, public ModelView +class LMMS_EXPORT Graph : public QWidget, public ModelView { Q_OBJECT public: @@ -111,7 +111,7 @@ private: } ; -class EXPORT graphModel : public Model +class LMMS_EXPORT graphModel : public Model { Q_OBJECT public: diff --git a/include/GuiApplication.h b/include/GuiApplication.h index 999db3009..8b4284c02 100644 --- a/include/GuiApplication.h +++ b/include/GuiApplication.h @@ -27,7 +27,7 @@ #include -#include "export.h" +#include "lmms_export.h" class QLabel; @@ -40,7 +40,7 @@ class PianoRollWindow; class ProjectNotes; class SongEditorWindow; -class EXPORT GuiApplication : public QObject +class LMMS_EXPORT GuiApplication : public QObject { Q_OBJECT; public: diff --git a/include/ImportFilter.h b/include/ImportFilter.h index 1b6fe2b59..1fc141a32 100644 --- a/include/ImportFilter.h +++ b/include/ImportFilter.h @@ -34,7 +34,7 @@ class TrackContainer; -class EXPORT ImportFilter : public Plugin +class LMMS_EXPORT ImportFilter : public Plugin { public: ImportFilter( const QString & _file_name, diff --git a/include/Instrument.h b/include/Instrument.h index ec7245dce..a373ae4ac 100644 --- a/include/Instrument.h +++ b/include/Instrument.h @@ -27,7 +27,7 @@ #define INSTRUMENT_H #include -#include "export.h" +#include "lmms_export.h" #include "lmms_basics.h" #include "MemoryManager.h" #include "MidiTime.h" @@ -41,7 +41,7 @@ class NotePlayHandle; class Track; -class EXPORT Instrument : public Plugin +class LMMS_EXPORT Instrument : public Plugin { MM_OPERATORS public: diff --git a/include/InstrumentPlayHandle.h b/include/InstrumentPlayHandle.h index f027b7d11..3463a128b 100644 --- a/include/InstrumentPlayHandle.h +++ b/include/InstrumentPlayHandle.h @@ -28,9 +28,9 @@ #include "PlayHandle.h" #include "Instrument.h" #include "NotePlayHandle.h" -#include "export.h" +#include "lmms_export.h" -class EXPORT InstrumentPlayHandle : public PlayHandle +class LMMS_EXPORT InstrumentPlayHandle : public PlayHandle { public: InstrumentPlayHandle( Instrument * instrument, InstrumentTrack* instrumentTrack ); diff --git a/include/InstrumentTrack.h b/include/InstrumentTrack.h index 5ef604def..fb12e825a 100644 --- a/include/InstrumentTrack.h +++ b/include/InstrumentTrack.h @@ -63,7 +63,7 @@ class LedCheckBox; class QLabel; -class EXPORT InstrumentTrack : public Track, public MidiEventProcessor +class LMMS_EXPORT InstrumentTrack : public Track, public MidiEventProcessor { Q_OBJECT MM_OPERATORS diff --git a/include/InstrumentView.h b/include/InstrumentView.h index d4f835708..9c6081a77 100644 --- a/include/InstrumentView.h +++ b/include/InstrumentView.h @@ -32,7 +32,7 @@ class InstrumentTrackWindow; -class EXPORT InstrumentView : public PluginView +class LMMS_EXPORT InstrumentView : public PluginView { public: InstrumentView( Instrument * _instrument, QWidget * _parent ); diff --git a/include/JournallingObject.h b/include/JournallingObject.h index f8e1a5950..6974bef84 100644 --- a/include/JournallingObject.h +++ b/include/JournallingObject.h @@ -31,7 +31,7 @@ #include "SerializingObject.h" -class EXPORT JournallingObject : public SerializingObject +class LMMS_EXPORT JournallingObject : public SerializingObject { public: JournallingObject(); diff --git a/include/Knob.h b/include/Knob.h index f6c9cfa99..319b38184 100644 --- a/include/Knob.h +++ b/include/Knob.h @@ -43,7 +43,7 @@ enum knobTypes -class EXPORT Knob : public QWidget, public FloatModelView +class LMMS_EXPORT Knob : public QWidget, public FloatModelView { Q_OBJECT Q_ENUMS( knobTypes ) diff --git a/include/Ladspa2LMMS.h b/include/Ladspa2LMMS.h index e5d35fbb1..14899487c 100644 --- a/include/Ladspa2LMMS.h +++ b/include/Ladspa2LMMS.h @@ -30,7 +30,7 @@ #include "LadspaManager.h" -class EXPORT Ladspa2LMMS : public LadspaManager +class LMMS_EXPORT Ladspa2LMMS : public LadspaManager { public: diff --git a/include/LadspaControl.h b/include/LadspaControl.h index 1cd8a304e..2ad895b3f 100644 --- a/include/LadspaControl.h +++ b/include/LadspaControl.h @@ -36,7 +36,7 @@ typedef struct PortDescription port_desc_t; -class EXPORT LadspaControl : public Model, public JournallingObject +class LMMS_EXPORT LadspaControl : public Model, public JournallingObject { Q_OBJECT public: diff --git a/include/LadspaControlView.h b/include/LadspaControlView.h index 34689af4e..d2d0ca44d 100644 --- a/include/LadspaControlView.h +++ b/include/LadspaControlView.h @@ -33,7 +33,7 @@ class LadspaControl; -class EXPORT LadspaControlView : public QWidget, public ModelView +class LMMS_EXPORT LadspaControlView : public QWidget, public ModelView { Q_OBJECT public: diff --git a/include/LadspaManager.h b/include/LadspaManager.h index 2338fbd4b..f9ac76eae 100644 --- a/include/LadspaManager.h +++ b/include/LadspaManager.h @@ -36,7 +36,7 @@ #include -#include "export.h" +#include "lmms_export.h" #include "lmms_basics.h" @@ -80,7 +80,7 @@ typedef struct ladspaManagerStorage } ladspaManagerDescription; -class EXPORT LadspaManager +class LMMS_EXPORT LadspaManager { public: diff --git a/include/LcdSpinBox.h b/include/LcdSpinBox.h index d6896f52b..ab04ec574 100644 --- a/include/LcdSpinBox.h +++ b/include/LcdSpinBox.h @@ -30,7 +30,7 @@ #include "AutomatableModelView.h" -class EXPORT LcdSpinBox : public LcdWidget, public IntModelView +class LMMS_EXPORT LcdSpinBox : public LcdWidget, public IntModelView { Q_OBJECT public: diff --git a/include/LcdWidget.h b/include/LcdWidget.h index 89bafd1d1..a9c551704 100644 --- a/include/LcdWidget.h +++ b/include/LcdWidget.h @@ -29,9 +29,9 @@ #include #include -#include "export.h" +#include "lmms_export.h" -class EXPORT LcdWidget : public QWidget +class LMMS_EXPORT LcdWidget : public QWidget { Q_OBJECT diff --git a/include/LedCheckbox.h b/include/LedCheckbox.h index b1c901ed6..00f74ac05 100644 --- a/include/LedCheckbox.h +++ b/include/LedCheckbox.h @@ -32,7 +32,7 @@ class QPixmap; -class EXPORT LedCheckBox : public AutomatableButton +class LMMS_EXPORT LedCheckBox : public AutomatableButton { Q_OBJECT public: diff --git a/include/LmmsPalette.h b/include/LmmsPalette.h index 5016ee978..49b831346 100644 --- a/include/LmmsPalette.h +++ b/include/LmmsPalette.h @@ -24,13 +24,13 @@ */ #include -#include "export.h" +#include "lmms_export.h" #ifndef LMMSPALETTE_H #define LMMSPALETTE_H -class EXPORT LmmsPalette : public QWidget +class LMMS_EXPORT LmmsPalette : public QWidget { Q_OBJECT Q_PROPERTY( QColor background READ background WRITE setBackground ) diff --git a/include/MainWindow.h b/include/MainWindow.h index 0c6addcdb..531cdfd52 100644 --- a/include/MainWindow.h +++ b/include/MainWindow.h @@ -61,7 +61,7 @@ public: void addSpacingToToolBar( int _size ); // wrap the widget with a window decoration and add it to the workspace - EXPORT SubWindow* addWindowedWidget(QWidget *w, Qt::WindowFlags windowFlags=0); + LMMS_EXPORT SubWindow* addWindowedWidget(QWidget *w, Qt::WindowFlags windowFlags=0); /// diff --git a/include/MemoryManager.h b/include/MemoryManager.h index 23561e4c0..4c225e026 100644 --- a/include/MemoryManager.h +++ b/include/MemoryManager.h @@ -30,9 +30,9 @@ #include #include -#include "export.h" +#include "lmms_export.h" -class EXPORT MemoryManager +class LMMS_EXPORT MemoryManager { public: struct ThreadGuard diff --git a/include/MidiTime.h b/include/MidiTime.h index 37fcf6258..7aaacf963 100644 --- a/include/MidiTime.h +++ b/include/MidiTime.h @@ -29,7 +29,7 @@ #include -#include "export.h" +#include "lmms_export.h" #include "lmms_basics.h" // note: 1 "Tact" = 1 Measure @@ -40,7 +40,7 @@ const int DefaultBeatsPerTact = DefaultTicksPerTact / DefaultStepsPerTact; class MeterModel; -class EXPORT TimeSig +class LMMS_EXPORT TimeSig { public: // in a time signature, @@ -57,7 +57,7 @@ private: }; -class EXPORT MidiTime +class LMMS_EXPORT MidiTime { public: MidiTime( const tact_t tact, const tick_t ticks ); diff --git a/include/Mixer.h b/include/Mixer.h index 499205892..bd057753a 100644 --- a/include/Mixer.h +++ b/include/Mixer.h @@ -66,7 +66,7 @@ const Octaves BaseOctave = DefaultOctave; class MixerWorkerThread; -class EXPORT Mixer : public QObject +class LMMS_EXPORT Mixer : public QObject { Q_OBJECT public: diff --git a/include/Model.h b/include/Model.h index 55e735a05..290639cc1 100644 --- a/include/Model.h +++ b/include/Model.h @@ -28,10 +28,10 @@ #include #include -#include "export.h" +#include "lmms_export.h" -class EXPORT Model : public QObject +class LMMS_EXPORT Model : public QObject { Q_OBJECT public: diff --git a/include/ModelView.h b/include/ModelView.h index a1071ddc2..907cd14ef 100644 --- a/include/ModelView.h +++ b/include/ModelView.h @@ -29,7 +29,7 @@ #include "Model.h" -class EXPORT ModelView +class LMMS_EXPORT ModelView { public: ModelView( Model* model, QWidget* widget ); diff --git a/include/Note.h b/include/Note.h index c14f9d931..0eae8f6b0 100644 --- a/include/Note.h +++ b/include/Note.h @@ -78,7 +78,7 @@ const float MaxDetuning = 4 * 12.0f; -class EXPORT Note : public SerializingObject +class LMMS_EXPORT Note : public SerializingObject { public: Note( const MidiTime & length = MidiTime( 0 ), diff --git a/include/NotePlayHandle.h b/include/NotePlayHandle.h index f4b6c9ec4..c94a69c2c 100644 --- a/include/NotePlayHandle.h +++ b/include/NotePlayHandle.h @@ -42,7 +42,7 @@ typedef QList NotePlayHandleList; typedef QList ConstNotePlayHandleList; -class EXPORT NotePlayHandle : public PlayHandle, public Note +class LMMS_EXPORT NotePlayHandle : public PlayHandle, public Note { MM_OPERATORS public: diff --git a/include/Oscillator.h b/include/Oscillator.h index 6e89f9cb1..408e69dbc 100644 --- a/include/Oscillator.h +++ b/include/Oscillator.h @@ -39,7 +39,7 @@ class IntModel; -class EXPORT Oscillator +class LMMS_EXPORT Oscillator { MM_OPERATORS public: diff --git a/include/Pattern.h b/include/Pattern.h index 5924a0862..eddbed313 100644 --- a/include/Pattern.h +++ b/include/Pattern.h @@ -46,7 +46,7 @@ class SampleBuffer; -class EXPORT Pattern : public TrackContentObject +class LMMS_EXPORT Pattern : public TrackContentObject { Q_OBJECT public: diff --git a/include/PeakController.h b/include/PeakController.h index 39d7fded9..b2824f0ac 100644 --- a/include/PeakController.h +++ b/include/PeakController.h @@ -36,7 +36,7 @@ class PeakControllerEffect; typedef QVector PeakControllerEffectVector; -class EXPORT PeakController : public Controller +class LMMS_EXPORT PeakController : public Controller { Q_OBJECT public: diff --git a/include/PixmapButton.h b/include/PixmapButton.h index 9f6ef8071..e44f5d952 100644 --- a/include/PixmapButton.h +++ b/include/PixmapButton.h @@ -31,7 +31,7 @@ #include "AutomatableButton.h" -class EXPORT PixmapButton : public AutomatableButton +class LMMS_EXPORT PixmapButton : public AutomatableButton { Q_OBJECT public: diff --git a/include/PlayHandle.h b/include/PlayHandle.h index a1c8e5c33..1760e1ec7 100644 --- a/include/PlayHandle.h +++ b/include/PlayHandle.h @@ -28,7 +28,7 @@ #include #include -#include "export.h" +#include "lmms_export.h" #include "MemoryManager.h" @@ -40,7 +40,7 @@ class QThread; class Track; class AudioPort; -class EXPORT PlayHandle : public ThreadableJob +class LMMS_EXPORT PlayHandle : public ThreadableJob { public: enum Types diff --git a/include/Plugin.h b/include/Plugin.h index 793997635..a2cc7d696 100644 --- a/include/Plugin.h +++ b/include/Plugin.h @@ -41,7 +41,7 @@ class PluginView; class AutomatableModel; -class EXPORT Plugin : public Model, public JournallingObject +class LMMS_EXPORT Plugin : public Model, public JournallingObject { MM_OPERATORS Q_OBJECT @@ -78,7 +78,7 @@ public: return QString( supportedFileTypes ).split( QChar( ',' ) ).contains( extension ); } - class EXPORT SubPluginFeatures + class LMMS_EXPORT SubPluginFeatures { public: struct Key diff --git a/include/PluginFactory.h b/include/PluginFactory.h index fb3e8ea94..56d32c4e4 100644 --- a/include/PluginFactory.h +++ b/include/PluginFactory.h @@ -31,12 +31,12 @@ #include #include -#include "export.h" +#include "lmms_export.h" #include "Plugin.h" class QLibrary; -class EXPORT PluginFactory +class LMMS_EXPORT PluginFactory { public: struct PluginInfo diff --git a/include/PluginView.h b/include/PluginView.h index 414e2bcae..476d65acf 100644 --- a/include/PluginView.h +++ b/include/PluginView.h @@ -31,7 +31,7 @@ #include "ModelView.h" -class EXPORT PluginView : public QWidget, public ModelView +class LMMS_EXPORT PluginView : public QWidget, public ModelView { public: PluginView( Plugin * _plugin, QWidget * _parent ) : diff --git a/include/PresetPreviewPlayHandle.h b/include/PresetPreviewPlayHandle.h index 313c20897..57996fa17 100644 --- a/include/PresetPreviewPlayHandle.h +++ b/include/PresetPreviewPlayHandle.h @@ -32,7 +32,7 @@ class InstrumentTrack; class PreviewTrackContainer; -class EXPORT PresetPreviewPlayHandle : public PlayHandle +class LMMS_EXPORT PresetPreviewPlayHandle : public PlayHandle { public: PresetPreviewPlayHandle( const QString& presetFile, bool loadByPlugin = false, DataFile *dataFile = 0 ); diff --git a/include/ProjectNotes.h b/include/ProjectNotes.h index 4477b112f..ab82e4eeb 100644 --- a/include/ProjectNotes.h +++ b/include/ProjectNotes.h @@ -37,7 +37,7 @@ class QTextCharFormat; class QTextEdit; -class EXPORT ProjectNotes : public QMainWindow, public SerializingObject +class LMMS_EXPORT ProjectNotes : public QMainWindow, public SerializingObject { Q_OBJECT public: diff --git a/include/ProjectRenderer.h b/include/ProjectRenderer.h index acc512063..4f932ad34 100644 --- a/include/ProjectRenderer.h +++ b/include/ProjectRenderer.h @@ -30,8 +30,9 @@ #include "Mixer.h" #include "OutputSettings.h" +#include "lmms_export.h" -class ProjectRenderer : public QThread +class LMMS_EXPORT ProjectRenderer : public QThread { Q_OBJECT public: diff --git a/include/RemotePlugin.h b/include/RemotePlugin.h index e0df85003..0a14458f6 100644 --- a/include/RemotePlugin.h +++ b/include/RemotePlugin.h @@ -25,7 +25,7 @@ #ifndef REMOTE_PLUGIN_H #define REMOTE_PLUGIN_H -#include "export.h" +#include "lmms_export.h" #include "MidiEvent.h" #include "VstSyncData.h" @@ -79,8 +79,8 @@ typedef int32_t key_t; #ifdef BUILD_REMOTE_PLUGIN_CLIENT -#undef EXPORT -#define EXPORT +#undef LMMS_EXPORT +#define LMMS_EXPORT #define COMPILE_REMOTE_PLUGIN_BASE #ifndef SYNC_WITH_SHM_FIFO @@ -444,7 +444,7 @@ enum RemoteMessageIDs -class EXPORT RemotePluginBase +class LMMS_EXPORT RemotePluginBase { public: struct message @@ -768,7 +768,7 @@ private: } ; -class EXPORT RemotePlugin : public QObject, public RemotePluginBase +class LMMS_EXPORT RemotePlugin : public QObject, public RemotePluginBase { Q_OBJECT public: diff --git a/include/RingBuffer.h b/include/RingBuffer.h index 3386c1175..c761616bd 100644 --- a/include/RingBuffer.h +++ b/include/RingBuffer.h @@ -32,7 +32,7 @@ #include "lmms_math.h" #include "MemoryManager.h" -class EXPORT RingBuffer : public QObject +class LMMS_EXPORT RingBuffer : public QObject { Q_OBJECT MM_OPERATORS diff --git a/include/SampleBuffer.h b/include/SampleBuffer.h index 974da669f..26dda70a9 100644 --- a/include/SampleBuffer.h +++ b/include/SampleBuffer.h @@ -31,7 +31,7 @@ #include -#include "export.h" +#include "lmms_export.h" #include "interpolation.h" #include "lmms_basics.h" #include "lmms_math.h" @@ -48,7 +48,7 @@ class QRect; // may need to be higher - conversely, to optimize, some may work with lower values const f_cnt_t MARGIN[] = { 64, 64, 64, 4, 4 }; -class EXPORT SampleBuffer : public QObject, public sharedObject +class LMMS_EXPORT SampleBuffer : public QObject, public sharedObject { Q_OBJECT MM_OPERATORS @@ -58,7 +58,7 @@ public: LoopOn, LoopPingPong }; - class EXPORT handleState + class LMMS_EXPORT handleState { MM_OPERATORS public: diff --git a/include/SerializingObject.h b/include/SerializingObject.h index e82ac7fcb..b61794d7c 100644 --- a/include/SerializingObject.h +++ b/include/SerializingObject.h @@ -27,7 +27,7 @@ #include -#include "export.h" +#include "lmms_export.h" class QDomDocument; @@ -36,7 +36,7 @@ class QDomElement; class SerializingObjectHook; -class EXPORT SerializingObject +class LMMS_EXPORT SerializingObject { public: SerializingObject(); diff --git a/include/Song.h b/include/Song.h index 8b2c21316..1f012f1be 100644 --- a/include/Song.h +++ b/include/Song.h @@ -48,7 +48,7 @@ const bpm_t MaxTempo = 999; const tick_t MaxSongLength = 9999 * DefaultTicksPerTact; -class EXPORT Song : public TrackContainer +class LMMS_EXPORT Song : public TrackContainer { Q_OBJECT mapPropertyFromModel( int,getTempo,setTempo,m_tempoModel ); diff --git a/include/StringPairDrag.h b/include/StringPairDrag.h index a69d7d143..cebc3089a 100644 --- a/include/StringPairDrag.h +++ b/include/StringPairDrag.h @@ -31,12 +31,12 @@ #include #include -#include "export.h" +#include "lmms_export.h" class QPixmap; -class EXPORT StringPairDrag : public QDrag +class LMMS_EXPORT StringPairDrag : public QDrag { public: StringPairDrag( const QString & _key, const QString & _value, diff --git a/include/SubWindow.h b/include/SubWindow.h index 24485109e..067f9e312 100644 --- a/include/SubWindow.h +++ b/include/SubWindow.h @@ -34,7 +34,7 @@ #include #include -#include "export.h" +#include "lmms_export.h" class QMoveEvent; class QResizeEvent; @@ -48,7 +48,7 @@ class QWidget; * for cusomizing the title bar appearance, lmms implements its own subwindow * class. */ -class EXPORT SubWindow : public QMdiSubWindow +class LMMS_EXPORT SubWindow : public QMdiSubWindow { Q_OBJECT Q_PROPERTY( QBrush activeColor READ activeColor WRITE setActiveColor ) diff --git a/include/TabBar.h b/include/TabBar.h index 4ef0b1ac7..48b429bd5 100644 --- a/include/TabBar.h +++ b/include/TabBar.h @@ -30,13 +30,13 @@ #include #include -#include "export.h" +#include "lmms_export.h" class TabButton; -class EXPORT TabBar : public QWidget +class LMMS_EXPORT TabBar : public QWidget { Q_OBJECT public: diff --git a/include/TempoSyncKnob.h b/include/TempoSyncKnob.h index 343deb067..034e2b8f4 100644 --- a/include/TempoSyncKnob.h +++ b/include/TempoSyncKnob.h @@ -34,7 +34,7 @@ class MeterDialog; -class EXPORT TempoSyncKnob : public Knob +class LMMS_EXPORT TempoSyncKnob : public Knob { Q_OBJECT public: diff --git a/include/TempoSyncKnobModel.h b/include/TempoSyncKnobModel.h index 893e23eb4..9a8ad619c 100644 --- a/include/TempoSyncKnobModel.h +++ b/include/TempoSyncKnobModel.h @@ -30,7 +30,7 @@ class QAction; -class EXPORT TempoSyncKnobModel : public FloatModel +class LMMS_EXPORT TempoSyncKnobModel : public FloatModel { Q_OBJECT public: diff --git a/include/TextFloat.h b/include/TextFloat.h index 673e40e63..ed10516b5 100644 --- a/include/TextFloat.h +++ b/include/TextFloat.h @@ -29,10 +29,10 @@ #include #include -#include "export.h" +#include "lmms_export.h" -class EXPORT TextFloat : public QWidget +class LMMS_EXPORT TextFloat : public QWidget { Q_OBJECT public: diff --git a/include/ToolPlugin.h b/include/ToolPlugin.h index bc8b3cf18..8a65147ac 100644 --- a/include/ToolPlugin.h +++ b/include/ToolPlugin.h @@ -29,7 +29,7 @@ #include "Plugin.h" -class EXPORT ToolPlugin : public Plugin +class LMMS_EXPORT ToolPlugin : public Plugin { public: ToolPlugin( const Descriptor * _descriptor, Model * _parent ); diff --git a/include/ToolPluginView.h b/include/ToolPluginView.h index de0f8bb1e..2b64caaaf 100644 --- a/include/ToolPluginView.h +++ b/include/ToolPluginView.h @@ -30,7 +30,7 @@ class ToolPlugin; -class EXPORT ToolPluginView : public PluginView +class LMMS_EXPORT ToolPluginView : public PluginView { public: ToolPluginView( ToolPlugin * _toolPlugin ); diff --git a/include/ToolTip.h b/include/ToolTip.h index 76b571bca..7f769a05b 100644 --- a/include/ToolTip.h +++ b/include/ToolTip.h @@ -28,14 +28,14 @@ #include -#include "export.h" +#include "lmms_export.h" class QWidget; struct ToolTip { - static void EXPORT add( QWidget * _w, const QString & _txt ); + static void LMMS_EXPORT add( QWidget * _w, const QString & _txt ); } ; diff --git a/include/Track.h b/include/Track.h index 6ac6e390f..302dcb5cc 100644 --- a/include/Track.h +++ b/include/Track.h @@ -463,7 +463,7 @@ signals: // base-class for all tracks -class EXPORT Track : public Model, public JournallingObject +class LMMS_EXPORT Track : public Model, public JournallingObject { Q_OBJECT MM_OPERATORS diff --git a/include/TrackContainer.h b/include/TrackContainer.h index 33569c9d9..1caca922e 100644 --- a/include/TrackContainer.h +++ b/include/TrackContainer.h @@ -37,7 +37,7 @@ class InstrumentTrack; class TrackContainerView; -class EXPORT TrackContainer : public Model, public JournallingObject +class LMMS_EXPORT TrackContainer : public Model, public JournallingObject { Q_OBJECT public: diff --git a/include/ValueBuffer.h b/include/ValueBuffer.h index 1e714d455..f9869de88 100644 --- a/include/ValueBuffer.h +++ b/include/ValueBuffer.h @@ -29,9 +29,9 @@ #include #include "MemoryManager.h" -#include "export.h" +#include "lmms_export.h" -class EXPORT ValueBuffer : public std::vector +class LMMS_EXPORT ValueBuffer : public std::vector { MM_OPERATORS public: diff --git a/include/embed.h b/include/embed.h index 57ca743cd..6348331f7 100644 --- a/include/embed.h +++ b/include/embed.h @@ -28,15 +28,15 @@ #include #include -#include "export.h" +#include "lmms_export.h" #include "lmms_basics.h" namespace embed { -QPixmap EXPORT getIconPixmap( const QString& _name, int _w = -1, int _h = -1 ); -QString EXPORT getText( const char * _name ); +QPixmap LMMS_EXPORT getIconPixmap( const QString& _name, int _w = -1, int _h = -1 ); +QString LMMS_EXPORT getText( const char * _name ); } diff --git a/include/export.h b/include/export.h deleted file mode 100644 index dd3709704..000000000 --- a/include/export.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * export.h - macros for export-declarations - * - * Copyright (c) 2008 Tobias Doerffel - * - * This file is part of LMMS - https://lmms.io - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program (see COPYING); if not, write to the - * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301 USA. - * - */ - -#ifndef EXPORT_H -#define EXPORT_H - -#include "lmmsconfig.h" - -#ifdef LMMS_BUILD_WIN32 - -#ifdef PLUGIN_NAME -#define EXPORT __declspec(dllimport) -#define PLUGIN_EXPORT __declspec(dllexport) -#else -#define EXPORT __declspec(dllexport) -#endif - -#else - -#define EXPORT -#define PLUGIN_EXPORT - -#endif - -#endif diff --git a/include/fft_helpers.h b/include/fft_helpers.h index c28af0237..23450d2ca 100644 --- a/include/fft_helpers.h +++ b/include/fft_helpers.h @@ -26,7 +26,7 @@ #ifndef FFT_HELPERS_H #define FFT_HELPERS_H -#include "export.h" +#include "lmms_export.h" #include @@ -44,13 +44,13 @@ enum WINDOWS * * returns -1 on error */ -float EXPORT maximum( float * _abs_spectrum, unsigned int _spec_size ); +float LMMS_EXPORT maximum( float * _abs_spectrum, unsigned int _spec_size ); /* apply hanning or hamming window to channel * * returns -1 on error */ -int EXPORT hanming( float * _timebuffer, int _length, WINDOWS _type ); +int LMMS_EXPORT hanming( float * _timebuffer, int _length, WINDOWS _type ); /* compute absolute values of complex_buffer, save to absspec_buffer * take care that - compl_len is not bigger than complex_buffer! @@ -58,7 +58,7 @@ int EXPORT hanming( float * _timebuffer, int _length, WINDOWS _type ); * * returns 0 on success, else -1 */ -int EXPORT absspec( fftwf_complex * _complex_buffer, float * _absspec_buffer, +int LMMS_EXPORT absspec( fftwf_complex * _complex_buffer, float * _absspec_buffer, int _compl_length ); /* build fewer subbands from many absolute spectrum values @@ -67,11 +67,11 @@ int EXPORT absspec( fftwf_complex * _complex_buffer, float * _absspec_buffer, * * returns 0 on success, else -1 */ -int EXPORT compressbands( float * _absspec_buffer, float * _compressedband, +int LMMS_EXPORT compressbands( float * _absspec_buffer, float * _compressedband, int _num_old, int _num_new, int _bottom, int _top ); -int EXPORT calc13octaveband31( float * _absspec_buffer, float * _subbands, +int LMMS_EXPORT calc13octaveband31( float * _absspec_buffer, float * _subbands, int _num_spec, float _max_frequency ); /* compute power of finite time sequence @@ -79,6 +79,6 @@ int EXPORT calc13octaveband31( float * _absspec_buffer, float * _subbands, * * returns power on success, else -1 */ -float EXPORT signalpower(float *timesignal, int num_values); +float LMMS_EXPORT signalpower(float *timesignal, int num_values); #endif diff --git a/plugins/Amplifier/Amplifier.cpp b/plugins/Amplifier/Amplifier.cpp index c11fa6bcc..d90ea55b3 100644 --- a/plugins/Amplifier/Amplifier.cpp +++ b/plugins/Amplifier/Amplifier.cpp @@ -26,7 +26,7 @@ #include "Amplifier.h" #include "embed.h" - +#include "plugin_export.h" extern "C" { diff --git a/plugins/BassBooster/BassBooster.cpp b/plugins/BassBooster/BassBooster.cpp index f7387b46e..6fdb1671c 100644 --- a/plugins/BassBooster/BassBooster.cpp +++ b/plugins/BassBooster/BassBooster.cpp @@ -25,7 +25,7 @@ #include "BassBooster.h" #include "embed.h" - +#include "plugin_export.h" extern "C" { diff --git a/plugins/Bitcrush/Bitcrush.cpp b/plugins/Bitcrush/Bitcrush.cpp index 918b8efdd..0580d47cd 100644 --- a/plugins/Bitcrush/Bitcrush.cpp +++ b/plugins/Bitcrush/Bitcrush.cpp @@ -25,6 +25,7 @@ #include "Bitcrush.h" #include "embed.h" +#include "plugin_export.h" const int OS_RATE = 5; const float OS_RATIO = 1.0f / OS_RATE; diff --git a/plugins/CrossoverEQ/CrossoverEQ.cpp b/plugins/CrossoverEQ/CrossoverEQ.cpp index 3dc0e8265..e7d3dce7d 100644 --- a/plugins/CrossoverEQ/CrossoverEQ.cpp +++ b/plugins/CrossoverEQ/CrossoverEQ.cpp @@ -27,6 +27,7 @@ #include "CrossoverEQ.h" #include "lmms_math.h" #include "embed.h" +#include "plugin_export.h" extern "C" { diff --git a/plugins/Delay/DelayEffect.cpp b/plugins/Delay/DelayEffect.cpp index 0161178b8..0daad0d9d 100644 --- a/plugins/Delay/DelayEffect.cpp +++ b/plugins/Delay/DelayEffect.cpp @@ -26,7 +26,7 @@ #include "Engine.h" #include "embed.h" #include "interpolation.h" - +#include "plugin_export.h" extern "C" { diff --git a/plugins/DualFilter/DualFilter.cpp b/plugins/DualFilter/DualFilter.cpp index 94450cc6f..5b8b7a622 100644 --- a/plugins/DualFilter/DualFilter.cpp +++ b/plugins/DualFilter/DualFilter.cpp @@ -27,7 +27,7 @@ #include "embed.h" #include "BasicFilters.h" - +#include "plugin_export.h" extern "C" { diff --git a/plugins/Eq/EqEffect.cpp b/plugins/Eq/EqEffect.cpp index 64b43e5a5..6b7c61bcc 100644 --- a/plugins/Eq/EqEffect.cpp +++ b/plugins/Eq/EqEffect.cpp @@ -24,12 +24,13 @@ #include "EqEffect.h" -#include "embed.h" #include "Engine.h" #include "EqFader.h" #include "interpolation.h" #include "lmms_math.h" +#include "embed.h" +#include "plugin_export.h" extern "C" { diff --git a/plugins/Flanger/FlangerEffect.cpp b/plugins/Flanger/FlangerEffect.cpp index 1404c06b0..7e441cf62 100644 --- a/plugins/Flanger/FlangerEffect.cpp +++ b/plugins/Flanger/FlangerEffect.cpp @@ -24,7 +24,9 @@ #include "FlangerEffect.h" #include "Engine.h" + #include "embed.h" +#include "plugin_export.h" extern "C" { diff --git a/plugins/FreeBoy/FreeBoy.cpp b/plugins/FreeBoy/FreeBoy.cpp index 75391e452..1f720b825 100644 --- a/plugins/FreeBoy/FreeBoy.cpp +++ b/plugins/FreeBoy/FreeBoy.cpp @@ -42,6 +42,8 @@ #include "embed.h" +#include "plugin_export.h" + const blip_time_t FRAME_LENGTH = 70224; const long CLOCK_RATE = 4194304; diff --git a/plugins/HydrogenImport/HydrogenImport.cpp b/plugins/HydrogenImport/HydrogenImport.cpp index c7536e87e..9f9f1dd49 100644 --- a/plugins/HydrogenImport/HydrogenImport.cpp +++ b/plugins/HydrogenImport/HydrogenImport.cpp @@ -19,6 +19,8 @@ #include "BBTrackContainer.h" #include "Instrument.h" +#include "plugin_export.h" + #define MAX_LAYERS 4 extern "C" { diff --git a/plugins/MidiExport/MidiExport.cpp b/plugins/MidiExport/MidiExport.cpp index d691c4830..fde08646f 100644 --- a/plugins/MidiExport/MidiExport.cpp +++ b/plugins/MidiExport/MidiExport.cpp @@ -37,6 +37,7 @@ #include "BBTrack.h" #include "InstrumentTrack.h" +#include "plugin_export.h" extern "C" { diff --git a/plugins/MidiImport/MidiImport.cpp b/plugins/MidiImport/MidiImport.cpp index 1200c6f78..46fac9299 100644 --- a/plugins/MidiImport/MidiImport.cpp +++ b/plugins/MidiImport/MidiImport.cpp @@ -44,9 +44,11 @@ #include "MainWindow.h" #include "MidiTime.h" #include "debug.h" -#include "embed.h" #include "Song.h" +#include "embed.h" +#include "plugin_export.h" + #include "portsmf/allegro.h" #define makeID(_c0, _c1, _c2, _c3) \ diff --git a/plugins/MultitapEcho/MultitapEcho.cpp b/plugins/MultitapEcho/MultitapEcho.cpp index be46a50c6..bff032dee 100644 --- a/plugins/MultitapEcho/MultitapEcho.cpp +++ b/plugins/MultitapEcho/MultitapEcho.cpp @@ -25,7 +25,7 @@ #include "MultitapEcho.h" #include "embed.h" - +#include "plugin_export.h" extern "C" { diff --git a/plugins/OpulenZ/OpulenZ.cpp b/plugins/OpulenZ/OpulenZ.cpp index 4b11102c3..d8d5f3e26 100644 --- a/plugins/OpulenZ/OpulenZ.cpp +++ b/plugins/OpulenZ/OpulenZ.cpp @@ -59,6 +59,8 @@ #include "PixmapButton.h" #include "ToolTip.h" +#include "plugin_export.h" + extern "C" { diff --git a/plugins/SpectrumAnalyzer/SpectrumAnalyzer.cpp b/plugins/SpectrumAnalyzer/SpectrumAnalyzer.cpp index f07fa7f45..0b947a3ba 100644 --- a/plugins/SpectrumAnalyzer/SpectrumAnalyzer.cpp +++ b/plugins/SpectrumAnalyzer/SpectrumAnalyzer.cpp @@ -25,7 +25,7 @@ #include "SpectrumAnalyzer.h" #include "embed.h" - +#include "plugin_export.h" extern "C" { diff --git a/plugins/audio_file_processor/audio_file_processor.cpp b/plugins/audio_file_processor/audio_file_processor.cpp index 5f5f19c9d..6c080f7c9 100644 --- a/plugins/audio_file_processor/audio_file_processor.cpp +++ b/plugins/audio_file_processor/audio_file_processor.cpp @@ -45,7 +45,7 @@ #include "DataFile.h" #include "embed.h" - +#include "plugin_export.h" extern "C" { diff --git a/plugins/bit_invader/bit_invader.cpp b/plugins/bit_invader/bit_invader.cpp index 86069a13c..ecc77be0b 100644 --- a/plugins/bit_invader/bit_invader.cpp +++ b/plugins/bit_invader/bit_invader.cpp @@ -43,6 +43,8 @@ #include "embed.h" +#include "plugin_export.h" + extern "C" { diff --git a/plugins/dynamics_processor/dynamics_processor.cpp b/plugins/dynamics_processor/dynamics_processor.cpp index 12ed1fa88..8c02b827d 100644 --- a/plugins/dynamics_processor/dynamics_processor.cpp +++ b/plugins/dynamics_processor/dynamics_processor.cpp @@ -29,6 +29,7 @@ #include "interpolation.h" #include "embed.h" +#include "plugin_export.h" extern "C" { diff --git a/plugins/kicker/kicker.cpp b/plugins/kicker/kicker.cpp index 0318c92d2..2087cf880 100644 --- a/plugins/kicker/kicker.cpp +++ b/plugins/kicker/kicker.cpp @@ -36,7 +36,7 @@ #include "KickerOsc.h" #include "embed.h" - +#include "plugin_export.h" extern "C" { diff --git a/plugins/ladspa_browser/ladspa_browser.cpp b/plugins/ladspa_browser/ladspa_browser.cpp index 0e8275c4d..d265bc0e3 100644 --- a/plugins/ladspa_browser/ladspa_browser.cpp +++ b/plugins/ladspa_browser/ladspa_browser.cpp @@ -39,7 +39,7 @@ #include "TabButton.h" #include "embed.h" - +#include "plugin_export.h" extern "C" diff --git a/plugins/lb302/lb302.cpp b/plugins/lb302/lb302.cpp index 66b77ac35..00d94f52c 100644 --- a/plugins/lb302/lb302.cpp +++ b/plugins/lb302/lb302.cpp @@ -46,7 +46,7 @@ #include "BandLimitedWave.h" #include "embed.h" - +#include "plugin_export.h" // Envelope Recalculation period #define ENVINC 64 diff --git a/plugins/nes/Nes.cpp b/plugins/nes/Nes.cpp index 70251c6cc..5b34dcb1f 100644 --- a/plugins/nes/Nes.cpp +++ b/plugins/nes/Nes.cpp @@ -36,6 +36,7 @@ #include "Oscillator.h" #include "embed.h" +#include "plugin_export.h" extern "C" { diff --git a/plugins/patman/patman.cpp b/plugins/patman/patman.cpp index bf24c6d32..e555886fc 100644 --- a/plugins/patman/patman.cpp +++ b/plugins/patman/patman.cpp @@ -44,7 +44,7 @@ #include "embed.h" - +#include "plugin_export.h" extern "C" diff --git a/plugins/peak_controller_effect/peak_controller_effect.cpp b/plugins/peak_controller_effect/peak_controller_effect.cpp index 2b39352ff..e8b31d6a0 100644 --- a/plugins/peak_controller_effect/peak_controller_effect.cpp +++ b/plugins/peak_controller_effect/peak_controller_effect.cpp @@ -32,6 +32,7 @@ #include "lmms_math.h" #include "embed.h" +#include "plugin_export.h" extern "C" { diff --git a/plugins/sfxr/sfxr.cpp b/plugins/sfxr/sfxr.cpp index 02e7413bb..c99f46f88 100644 --- a/plugins/sfxr/sfxr.cpp +++ b/plugins/sfxr/sfxr.cpp @@ -54,6 +54,8 @@ float frnd(float range) #include "embed.h" +#include "plugin_export.h" + extern "C" { diff --git a/plugins/stereo_enhancer/stereo_enhancer.cpp b/plugins/stereo_enhancer/stereo_enhancer.cpp index cb55213f1..2faa5846d 100644 --- a/plugins/stereo_enhancer/stereo_enhancer.cpp +++ b/plugins/stereo_enhancer/stereo_enhancer.cpp @@ -26,7 +26,7 @@ #include "stereo_enhancer.h" #include "embed.h" - +#include "plugin_export.h" extern "C" { diff --git a/plugins/stereo_matrix/stereo_matrix.cpp b/plugins/stereo_matrix/stereo_matrix.cpp index b2634e95c..a03a615ba 100644 --- a/plugins/stereo_matrix/stereo_matrix.cpp +++ b/plugins/stereo_matrix/stereo_matrix.cpp @@ -26,7 +26,7 @@ #include "stereo_matrix.h" #include "embed.h" - +#include "plugin_export.h" extern "C" { diff --git a/plugins/triple_oscillator/TripleOscillator.cpp b/plugins/triple_oscillator/TripleOscillator.cpp index 55a7ed7ed..6b644fd46 100644 --- a/plugins/triple_oscillator/TripleOscillator.cpp +++ b/plugins/triple_oscillator/TripleOscillator.cpp @@ -40,7 +40,7 @@ #include "ToolTip.h" #include "embed.h" - +#include "plugin_export.h" extern "C" { diff --git a/plugins/watsyn/Watsyn.cpp b/plugins/watsyn/Watsyn.cpp index c0a952fb8..0122b293a 100644 --- a/plugins/watsyn/Watsyn.cpp +++ b/plugins/watsyn/Watsyn.cpp @@ -36,6 +36,7 @@ #include "interpolation.h" #include "embed.h" +#include "plugin_export.h" extern "C" { diff --git a/plugins/waveshaper/waveshaper.cpp b/plugins/waveshaper/waveshaper.cpp index 047cd05d1..3f9d3e19f 100644 --- a/plugins/waveshaper/waveshaper.cpp +++ b/plugins/waveshaper/waveshaper.cpp @@ -29,6 +29,7 @@ #include "embed.h" #include "interpolation.h" +#include "plugin_export.h" extern "C" { diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 84ddf4aee..42e667aca 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -101,11 +101,23 @@ ADD_LIBRARY(lmmsobjs OBJECT ${LMMS_UI_OUT} ${LMMS_RCC_OUT} ) + +GENERATE_EXPORT_HEADER(lmmsobjs + BASE_NAME lmms +) +# GENERATE_EXPORT_HEADER doesn't seem to do this automatically +TARGET_COMPILE_DEFINITIONS(lmmsobjs + PRIVATE -Dlmmsobjs_EXPORTS +) + ADD_EXECUTABLE(lmms core/main.cpp $ "${WINRC}" ) +TARGET_INCLUDE_DIRECTORIES(lmms + PUBLIC ${CMAKE_CURRENT_BINARY_DIR} +) # Set Visual Studio startup project to lmms # https://stackoverflow.com/a/37994396/8166701