Fast CDR  Version 1.1.1
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#define Cdr_DllAPI
52#endif // _WIN32
53
54// Auto linking.
55
56#if !defined(FASTCDR_SOURCE) && !defined(EPROSIMA_ALL_NO_LIB) \
57 && !defined(FASTCDR_NO_LIB)
58
59// Set properties.
60#define EPROSIMA_LIB_NAME fastcdr
61
62#if defined(EPROSIMA_ALL_DYN_LINK) || defined(FASTCDR_DYN_LINK)
63#define EPROSIMA_DYN_LINK
64#endif // if defined(EPROSIMA_ALL_DYN_LINK) || defined(FASTCDR_DYN_LINK)
65
66#include "eProsima_auto_link.h"
67#endif // auto-linking disabled
68
69#endif // _FASTCDR_FASTCDR_DLL_H_