summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--api/plugin-support.hpp18
-rw-r--r--cmake/opentrack-boilerplate.cmake1
2 files changed, 9 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)
diff --git a/cmake/opentrack-boilerplate.cmake b/cmake/opentrack-boilerplate.cmake
index 56117e09..e4369452 100644
--- a/cmake/opentrack-boilerplate.cmake
+++ b/cmake/opentrack-boilerplate.cmake
@@ -148,6 +148,7 @@ function(otr_module n_)
set(link-mode STATIC)
endif()
add_library(${n} ${link-mode} "${${n}-all}")
+ set_property(TARGET "${n}" PROPERTY PREFIX "lib")
endif()
set_property(SOURCE ${${n}-moc} ${${n}-uih} ${${n}-rcc} PROPERTY GENERATED TRUE)