add export macro

This commit is contained in:
Frank Osterfeld 2011-10-28 21:27:03 +02:00
parent 067c3c6577
commit ed718884cc
3 changed files with 21 additions and 1 deletions

View File

@ -9,6 +9,8 @@
#ifndef KEYCHAIN_H
#define KEYCHAIN_H
#include "qkeychain_export.h"
#include <QtCore/QString>
namespace QKeychain {
@ -22,7 +24,7 @@ namespace QKeychain {
*
* TODO we don't guarantee anything
*/
class Keychain {
class QKEYCHAIN_EXPORT Keychain {
public:
/**
* Creates a Keychain object.

View File

@ -7,6 +7,7 @@ HEADERS += keychain.h \
keychain_p.h
SOURCES += keychain.cpp
DEFINES += QKEYCHAIN_BUILD_QKEYCHAIN_LIB
macx {
LIBS += -framework Security -framework CoreFoundation

17
qkeychain_export.h Normal file
View File

@ -0,0 +1,17 @@
#ifndef QKEYCHAIN_EXPORT_H
#define QKEYCHAIN_EXPORT_H
#include <qglobal.h>
# ifdef QKEYCHAIN_STATICLIB
# undef QKEYCHAIN_SHAREDLIB
# define QKEYCHAIN_EXPORT
# else
# ifdef QKEYCHAIN_BUILD_QKEYCHAIN_LIB
# define QKEYCHAIN_EXPORT Q_DECL_EXPORT
# else
# define QKEYCHAIN_EXPORT Q_DECL_IMPORT
# endif
# endif
#endif