-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjkqtp_imexport.h
More file actions
executable file
·76 lines (49 loc) · 2.14 KB
/
Copy pathjkqtp_imexport.h
File metadata and controls
executable file
·76 lines (49 loc) · 2.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#ifndef JKQTP_IMPORT_H
#define JKQTP_IMPORT_H
/*
Copyright (c) 2008-2015 Jan W. Krieger (<jan@jkrieger.de>, <j.krieger@dkfz.de>), German Cancer Research Center (DKFZ) & IWR, University of Heidelberg
last modification: $LastChangedDate: 2015-04-02 13:55:22 +0200 (Do, 02 Apr 2015) $ (revision $Rev: 3902 $)
This software is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License (LGPL) as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License (LGPL) for more details.
You should have received a copy of the GNU Lesser General Public License (LGPL)
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*! \file jkqtp_imexport.h
\ingroup tools
This file allows to export functions and classes from this directory in a dynamic/shared lib and to append the
correct __declspec() declaration on windows. If you want to export one, make sure you have set
\code
#include "jkqtp_imexport.h"
class LIB_EXPORT exportedClassName {
...
};
LIB_EXPORT void exportedFunctionName();
\endcode
Then when compiling define the preprocessor symbol \c LIB_IN_DLL when exporting AND using the classes/functions.
When compiling the classes for export, also define the preprocessor symbol \c LIB_EXPORT_LIBRARY .
*/
# ifndef __WINDOWS__
# if defined(WIN32) || defined(WIN64) || defined(_MSC_VER) || defined(_WIN32)
# define __WINDOWS__
# endif
# endif
#ifdef __WINDOWS__
# ifdef LIB_IN_DLL
# if defined(LIB_EXPORT_LIBRARY)
# define LIB_EXPORT __declspec(dllexport)
# else
# define LIB_EXPORT __declspec(dllimport)
# endif
# else
# define LIB_EXPORT
# endif
#else
# define LIB_EXPORT
#endif
#endif // JKQTP_IMPORT_H