From 474d71067462f821697111a727e5f56767d2b00e Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Wed, 29 Dec 2021 18:07:08 +0100 Subject: Introduce quotient_export.h Instead of using CMake's generate_export_header macro, it's a bit easier to maintain a static file (that is not supposed to ever change) with necessary export/import/hidden visibility macros. --- lib/quotient_export.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 lib/quotient_export.h (limited to 'lib/quotient_export.h') diff --git a/lib/quotient_export.h b/lib/quotient_export.h new file mode 100644 index 00000000..5a6edb0e --- /dev/null +++ b/lib/quotient_export.h @@ -0,0 +1,23 @@ +// SPDX-FileCopyrightText: 2021 Kitsune Ral +// SPDX-License-Identifier: LGPL-2.1-or-later + +#pragma once + +#ifdef QUOTIENT_STATIC +# define QUOTIENT_API +# define QUOTIENT_HIDDEN +#else +# ifndef QUOTIENT_API +# ifdef BUILDING_SHARED_QUOTIENT + /* We are building this library */ +# define QUOTIENT_API Q_DECL_EXPORT +# else + /* We are using this library */ +# define QUOTIENT_API Q_DECL_IMPORT +# endif +# endif + +# ifndef QUOTIENT_HIDDEN +# define QUOTIENT_HIDDEN Q_DECL_HIDDEN +# endif +#endif -- cgit v1.2.3 From e93260a6b68279518270d0aec2c55f826375fa8a Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Wed, 16 Feb 2022 12:25:10 +0100 Subject: quotient_export.h: #include To ensure Q_DECL_EXPORT/Q_DECL_IMPORT macros are defined. --- lib/quotient_export.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/quotient_export.h') diff --git a/lib/quotient_export.h b/lib/quotient_export.h index 5a6edb0e..56767443 100644 --- a/lib/quotient_export.h +++ b/lib/quotient_export.h @@ -3,6 +3,8 @@ #pragma once +#include + #ifdef QUOTIENT_STATIC # define QUOTIENT_API # define QUOTIENT_HIDDEN -- cgit v1.2.3