mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-14 04:01:48 +00:00
6727cc2da4
Make API use TRACY_EXPORTS, and replace TRACYPROFILER_EXPORTS with TRACY_EXPORTS in vcxproj projects. Swap dllimport with dllexport. Reason for this is a common idiom in CMake: target_compile_definitions(tracy PUBLIC -DTRACY_IMPORTS PRIVATE -DTRACY_EXPORTS). This idiom adds both defines in tracy target, but targets that link to tracy only get TRACY_IMPORTS. Swapped statements ensure that tracy always dllexports it's api and consuming targets always dllimport it.
17 lines
390 B
C
17 lines
390 B
C
#ifndef __TRACYAPI_H__
|
|
#define __TRACYAPI_H__
|
|
|
|
#if defined _WIN32 || defined __CYGWIN__
|
|
# if defined TRACY_EXPORTS
|
|
# define TRACY_API __declspec(dllexport)
|
|
# elif defined TRACY_IMPORTS
|
|
# define TRACY_API __declspec(dllimport)
|
|
# else
|
|
# define TRACY_API
|
|
# endif
|
|
#else
|
|
# define TRACY_API __attribute__((visibility("default")))
|
|
#endif
|
|
|
|
#endif // __TRACYAPI_H__
|