libfilezilla
Loading...
Searching...
No Matches
visibility_helper.hpp
Go to the documentation of this file.
1#ifndef LIBFILEZILLA_VISIBILITY_HELPER_HEADER
2#define LIBFILEZILLA_VISIBILITY_HELPER_HEADER
3
29
30#ifdef DOXYGEN
32#define FZ_EXPORT_PUBLIC
33
35#define FZ_EXPORT_PRIVATE
36
38#define FZ_IMPORT_SHARED
39
40#else
41
42#include "private/defs.hpp"
43
44// Two cases when building: Windows, other platform
45#ifdef FZ_WINDOWS
46
47 // Under Windows we can either use Visual Studio or a proper compiler
48 #ifdef _MSC_VER
49 #define FZ_EXPORT_PUBLIC __declspec(dllexport)
50 #define FZ_EXPORT_PRIVATE
51 #else
52 #define FZ_EXPORT_PUBLIC __declspec(dllexport)
53 #define FZ_EXPORT_PRIVATE
54 #endif
55
56#else
57
58 #define FZ_EXPORT_PUBLIC __attribute__((visibility("default")))
59 #define FZ_EXPORT_PRIVATE __attribute__((visibility("hidden")))
60
61#endif
62
63
64#if defined(FZ_WINDOWS)
65 #define FZ_IMPORT_SHARED __declspec(dllimport)
66#else
67 #define FZ_IMPORT_SHARED
68#endif
69
70#endif
71
72#endif