From 60965e3a6c0bcf719a3dc266beccda4c4f560a72 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Tue, 17 May 2011 09:13:55 -0700 Subject: Determine the function export attribute using CMake --- include/AL/al.h | 14 ++++---------- include/AL/alc.h | 14 ++++---------- 2 files changed, 8 insertions(+), 20 deletions(-) (limited to 'include') diff --git a/include/AL/al.h b/include/AL/al.h index 44db7798..95d33988 100644 --- a/include/AL/al.h +++ b/include/AL/al.h @@ -5,17 +5,11 @@ extern "C" { #endif -#if defined(AL_LIBTYPE_STATIC) - #define AL_API -#elif defined(_WIN32) && !defined(_XBOX) - #if defined(AL_BUILD_LIBRARY) - #define AL_API __declspec(dllexport) - #else +#ifndef AL_API + #if defined(AL_LIBTYPE_STATIC) + #define AL_API + #elif defined(_WIN32) #define AL_API __declspec(dllimport) - #endif -#else - #if defined(AL_BUILD_LIBRARY) && defined(HAVE_GCC_VISIBILITY) - #define AL_API __attribute__((visibility("protected"))) #else #define AL_API extern #endif diff --git a/include/AL/alc.h b/include/AL/alc.h index 00cb762d..4712055c 100644 --- a/include/AL/alc.h +++ b/include/AL/alc.h @@ -5,17 +5,11 @@ extern "C" { #endif -#if defined(AL_LIBTYPE_STATIC) - #define ALC_API -#elif defined(_WIN32) && !defined(_XBOX) - #if defined(AL_BUILD_LIBRARY) - #define ALC_API __declspec(dllexport) - #else +#ifndef ALC_API + #if defined(AL_LIBTYPE_STATIC) + #define ALC_API + #elif defined(_WIN32) #define ALC_API __declspec(dllimport) - #endif -#else - #if defined(AL_BUILD_LIBRARY) && defined(HAVE_GCC_VISIBILITY) - #define ALC_API __attribute__((visibility("protected"))) #else #define ALC_API extern #endif -- cgit v1.2.3