diff --git a/effects/internal/vsthost.cpp b/effects/internal/vsthost.cpp index 110c31312..89fa02cdc 100644 --- a/effects/internal/vsthost.cpp +++ b/effects/internal/vsthost.cpp @@ -146,7 +146,7 @@ void VSTHost::loadPlugin() { #ifdef _WIN32 DWORD dll_err = GetLastError(); dll_error = QString::number(dll_err); -#elif __linux__ +#elif defined(__linux__) || defined(__HAIKU__) dll_error = dlerror(); #endif qCritical() << "Failed to load VST plugin" << dll_fn << "-" << dll_error; @@ -363,7 +363,7 @@ void VSTHost::show_interface(bool show) { dispatcher(plugin, effEditOpen, 0, 0, reinterpret_cast(dialog->windowHandle()->winId()), 0); #elif defined(__APPLE__) dispatcher(plugin, effEditOpen, 0, 0, reinterpret_cast(dialog->windowHandle()->winId()), 0); -#elif defined(__linux__) +#elif defined(__linux__) || defined(__HAIKU__) dispatcher(plugin, effEditOpen, 0, 0, reinterpret_cast(dialog->windowHandle()->winId()), 0); #endif } else { diff --git a/io/crossplatformlib.cpp b/io/crossplatformlib.cpp index b669a7b21..f5b7d486b 100644 --- a/io/crossplatformlib.cpp +++ b/io/crossplatformlib.cpp @@ -26,7 +26,7 @@ ModulePtr LibLoad(const QString &filename) { #ifdef _WIN32 LPCWSTR dll_fn_w = reinterpret_cast(filename.utf16()); return LoadLibrary(dll_fn_w); -#elif defined(__linux__) || defined(__APPLE__) +#elif defined(__linux__) || defined(__APPLE__) || defined(__HAIKU__) return dlopen(filename.toUtf8(), RTLD_LAZY); #else qWarning() << "Olive doesn't know how to open dynamic libraries on this platform, external libraries will not be functional"; @@ -37,7 +37,7 @@ ModulePtr LibLoad(const QString &filename) { QStringList LibFilter() { #ifdef _WIN32 return QStringList("*.dll"); -#elif defined(__linux__) || defined(__APPLE__) +#elif defined(__linux__) || defined(__APPLE__) || defined(__HAIKU__) return {"*.so", "*.dylib"}; #endif } diff --git a/io/crossplatformlib.h b/io/crossplatformlib.h index 387d16691..bd1935a7d 100644 --- a/io/crossplatformlib.h +++ b/io/crossplatformlib.h @@ -28,7 +28,7 @@ #define LibAddress GetProcAddress #define LibClose FreeModule #define ModulePtr HMODULE -#elif defined(__linux__) || defined(__APPLE__) +#elif defined(__linux__) || defined(__APPLE__) || defined(__HAIKU__) #include #define LibAddress dlsym #define LibClose dlclose diff --git a/olive.pro b/olive.pro index ddaedc3c5..f31ec75ab 100644 --- a/olive.pro +++ b/olive.pro @@ -304,6 +304,8 @@ mac { unix:!mac { CONFIG += link_pkgconfig PKGCONFIG += libavutil libavformat libavcodec libavfilter libswscale libswresample +} +unix:!mac:!haiku { LIBS += -ldl } diff --git a/project/effectloaders.cpp b/project/effectloaders.cpp index e2da64487..443caec1e 100644 --- a/project/effectloaders.cpp +++ b/project/effectloaders.cpp @@ -231,7 +231,7 @@ void load_frei0r_effects() { QList effect_dirs = get_effects_paths(); // add defined paths for frei0r plugins on unix -#if defined(__APPLE__) || defined(__linux__) +#if defined(__APPLE__) || defined(__linux__) || defined(__HAIKU__) effect_dirs.prepend("/usr/lib/frei0r-1"); effect_dirs.prepend("/usr/local/lib/frei0r-1"); effect_dirs.prepend(QDir::homePath() + "/.frei0r-1/lib");