mirror of
https://github.com/cookiengineer/audacity
synced 2025-12-02 06:40:12 +01:00
Move definition of AUDACITY_DLL_API into src/CMakeLists.txt
This commit is contained in:
committed by
Leland Lucius
parent
b9ca0acb4a
commit
f2b53c82eb
@@ -790,60 +790,4 @@ using EffectFamilySymbol = ComponentInterfaceSymbol;
|
||||
// the API is complete.
|
||||
|
||||
|
||||
#if !defined(AUDACITY_DLL_API)
|
||||
// This was copied from "Audacity.h" so these headers wouldn't have
|
||||
// to include it.
|
||||
|
||||
/* Magic for dynamic library import and export. This is unfortunately
|
||||
* compiler-specific because there isn't a standard way to do it. Currently it
|
||||
* works with the Visual Studio compiler for windows, and for GCC 4+. Anything
|
||||
* else gets all symbols made public, which gets messy */
|
||||
/* The Visual Studio implementation */
|
||||
#ifdef _MSC_VER
|
||||
#ifndef AUDACITY_DLL_API
|
||||
#ifdef BUILDING_AUDACITY
|
||||
#define AUDACITY_DLL_API _declspec(dllexport)
|
||||
#else
|
||||
#ifdef _DLL
|
||||
#define AUDACITY_DLL_API _declspec(dllimport)
|
||||
#else
|
||||
#define AUDACITY_DLL_API
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif //_MSC_VER
|
||||
|
||||
/* The GCC-elf implementation */
|
||||
#ifdef HAVE_VISIBILITY // this is provided by the configure script, is only
|
||||
// enabled for suitable GCC versions
|
||||
/* The incantation is a bit weird here because it uses ELF symbol stuff. If we
|
||||
* make a symbol "default" it makes it visible (for import or export). Making it
|
||||
* "hidden" means it is invisible outside the shared object. */
|
||||
#ifndef AUDACITY_DLL_API
|
||||
#ifdef BUILDING_AUDACITY
|
||||
#define AUDACITY_DLL_API __attribute__((visibility("default")))
|
||||
#else
|
||||
#define AUDACITY_DLL_API __attribute__((visibility("default")))
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* The GCC-win32 implementation */
|
||||
// bizzarely, GCC-for-win32 supports Visual Studio style symbol visibility, so
|
||||
// we use that if building on Cygwin
|
||||
#if defined __CYGWIN__ && defined __GNUC__
|
||||
#ifndef AUDACITY_DLL_API
|
||||
#ifdef BUILDING_AUDACITY
|
||||
#define AUDACITY_DLL_API _declspec(dllexport)
|
||||
#else
|
||||
#ifdef _DLL
|
||||
#define AUDACITY_DLL_API _declspec(dllimport)
|
||||
#else
|
||||
#define AUDACITY_DLL_API
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif // __AUDACITY_TYPES_H__
|
||||
|
||||
Reference in New Issue
Block a user