diff options
| author | Stanislaw Halik <sthalik@misaki.pl> | 2018-01-09 15:06:04 +0100 | 
|---|---|---|
| committer | Stanislaw Halik <sthalik@misaki.pl> | 2018-01-10 03:18:57 +0100 | 
| commit | bd3370d4ef79ed5e0713a6446889cca6f5a4d5e2 (patch) | |
| tree | 301e679ccf17e679a3a75d8ae46847a4ace303d3 /api | |
| parent | af2dcca279e6fc23c9b1694170cbdfe36b32eb79 (diff) | |
api, cmake: use the same dynamic library prefix
Diffstat (limited to 'api')
| -rw-r--r-- | api/plugin-support.hpp | 18 | 
1 files changed, 8 insertions, 10 deletions
| diff --git a/api/plugin-support.hpp b/api/plugin-support.hpp index 85b8653c..f495b45a 100644 --- a/api/plugin-support.hpp +++ b/api/plugin-support.hpp @@ -29,11 +29,7 @@  #   define OPENTRACK_SOLIB_EXT "so"  #endif -#ifdef _MSC_VER -#   define OPENTRACK_SOLIB_PREFIX "" -#else -#   define OPENTRACK_SOLIB_PREFIX "lib" -#endif +#define OPENTRACK_SOLIB_PREFIX "lib"  extern "C" typedef void* (*OPENTRACK_CTOR_FUNPTR)(void);  extern "C" typedef Metadata* (*OPENTRACK_METADATA_FUNPTR)(void); @@ -93,14 +89,16 @@ struct dylib final          QDir module_directory(library_path);          QList<std::shared_ptr<dylib>> ret; +        using str = QLatin1String; +          static const struct filter_ {              Type type; -            QString glob; +            QLatin1String glob;          } filters[] = { -            { Filter, QStringLiteral(OPENTRACK_SOLIB_PREFIX "opentrack-filter-*." OPENTRACK_SOLIB_EXT), }, -            { Tracker, QStringLiteral(OPENTRACK_SOLIB_PREFIX "opentrack-tracker-*." OPENTRACK_SOLIB_EXT), }, -            { Protocol, QStringLiteral(OPENTRACK_SOLIB_PREFIX "opentrack-proto-*." OPENTRACK_SOLIB_EXT), }, -            { Extension, QStringLiteral(OPENTRACK_SOLIB_PREFIX "opentrack-ext-*." OPENTRACK_SOLIB_EXT), }, +            { Filter, str(OPENTRACK_SOLIB_PREFIX "opentrack-filter-*." OPENTRACK_SOLIB_EXT), }, +            { Tracker, str(OPENTRACK_SOLIB_PREFIX "opentrack-tracker-*." OPENTRACK_SOLIB_EXT), }, +            { Protocol, str(OPENTRACK_SOLIB_PREFIX "opentrack-proto-*." OPENTRACK_SOLIB_EXT), }, +            { Extension, str(OPENTRACK_SOLIB_PREFIX "opentrack-ext-*." OPENTRACK_SOLIB_EXT), },          };          for (const filter_& filter : filters) | 
