| Fast CDR Version 2.3.6 Fast CDR

Loading...
Searching...
No Matches
fastcdr_dll.h
1// Copyright 2016 Proyectos y Sistemas de Mantenimiento SL (eProsima).
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15#ifndef _FASTCDR_FASTCDR_DLL_H_
16#define _FASTCDR_FASTCDR_DLL_H_
17
18#include <fastcdr/config.h>
19
20// normalize macros
21#if !defined(FASTCDR_DYN_LINK) && !defined(FASTCDR_STATIC_LINK) \
22 && !defined(EPROSIMA_ALL_DYN_LINK) && !defined(EPROSIMA_ALL_STATIC_LINK)
23#define FASTCDR_STATIC_LINK
24#endif // if !defined(FASTCDR_DYN_LINK) && !defined(FASTCDR_STATIC_LINK) && !defined(EPROSIMA_ALL_DYN_LINK) && !defined(EPROSIMA_ALL_STATIC_LINK)
25
26#if defined(EPROSIMA_ALL_DYN_LINK) && !defined(FASTCDR_DYN_LINK)
27#define FASTCDR_DYN_LINK
28#endif // if defined(EPROSIMA_ALL_DYN_LINK) && !defined(FASTCDR_DYN_LINK)
29
30#if defined(FASTCDR_DYN_LINK) && defined(FASTCDR_STATIC_LINK)
31#error Must not define both FASTCDR_DYN_LINK and FASTCDR_STATIC_LINK
32#endif // if defined(FASTCDR_DYN_LINK) && defined(FASTCDR_STATIC_LINK)
33
34#if defined(EPROSIMA_ALL_NO_LIB) && !defined(FASTCDR_NO_LIB)
35#define FASTCDR_NO_LIB
36#endif // if defined(EPROSIMA_ALL_NO_LIB) && !defined(FASTCDR_NO_LIB)
37
38// enable dynamic linking
39
40#if defined(_WIN32)
41#if defined(EPROSIMA_ALL_DYN_LINK) || defined(FASTCDR_DYN_LINK)
42#if defined(fastcdr_EXPORTS)
43#define Cdr_DllAPI __declspec( dllexport )
44#else
45#define Cdr_DllAPI __declspec( dllimport )
46#endif // FASTCDR_SOURCE
47#else
48#define Cdr_DllAPI
49#endif // if defined(EPROSIMA_ALL_DYN_LINK) || defined(FASTCDR_DYN_LINK)
50#else
51#if __GNUC__ >= 4
52#define Cdr_DllAPI __attribute__((visibility("default")))
53#else
54#define Cdr_DllAPI
55#endif // if __GNUC__ >= 4
56#endif // _WIN32
57
58// Auto linking.
59
60#if !defined(FASTCDR_SOURCE) && !defined(EPROSIMA_ALL_NO_LIB) \
61 && !defined(FASTCDR_NO_LIB)
62
63// Set properties.
64#define EPROSIMA_LIB_NAME fastcdr
65
66#if defined(EPROSIMA_ALL_DYN_LINK) || defined(FASTCDR_DYN_LINK)
67#define EPROSIMA_DYN_LINK
68#endif // if defined(EPROSIMA_ALL_DYN_LINK) || defined(FASTCDR_DYN_LINK)
69
70#include "eProsima_auto_link.h"
71#endif // auto-linking disabled
72
73#endif // _FASTCDR_FASTCDR_DLL_H_