VRS
A file format for sensor data.
Loading...
Searching...
No Matches
vrs
VrsExport.h
1
/*
2
* Copyright (c) Meta Platforms, Inc. and affiliates.
3
*
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
* you may not use this file except in compliance with the License.
6
* You may obtain a copy of the License at
7
*
8
* http://www.apache.org/licenses/LICENSE-2.0
9
*
10
* Unless required by applicable law or agreed to in writing, software
11
* distributed under the License is distributed on an "AS IS" BASIS,
12
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
* See the License for the specific language governing permissions and
14
* limitations under the License.
15
*/
16
17
#pragma once
18
19
#include <vrs/os/Platform.h>
20
21
// Cross-platform export annotation for the `vrs_shared` library. Decorate every public class and
22
// free function with VRS_API so a single shared library exports the whole VRS API, giving one copy
23
// of every symbol process-wide. The shared library is compiled with VRS_API_SHARED_BUILD (export);
24
// its consumers compile with VRS_API_SHARED_IMPORT (import). The default static `:vrs` build
25
// defines neither, so VRS_API expands to nothing and that build is unchanged.
26
#if IS_WINDOWS_PLATFORM()
27
#if defined(VRS_API_SHARED_BUILD)
28
#define VRS_API __declspec(dllexport)
29
#elif defined(VRS_API_SHARED_IMPORT)
30
#define VRS_API __declspec(dllimport)
31
#else
32
#define VRS_API
33
#endif
34
#else
35
#if defined(VRS_API_SHARED_BUILD) || defined(VRS_API_SHARED_IMPORT)
36
#define VRS_API __attribute__((visibility("default")))
37
#else
38
#define VRS_API
39
#endif
40
#endif
Generated by
1.9.8