diff options
author | axis <qt-info@nokia.com> | 2009-04-24 11:34:15 (GMT) |
---|---|---|
committer | axis <qt-info@nokia.com> | 2009-04-24 11:34:15 (GMT) |
commit | 8f427b2b914d5b575a4a7c0ed65d2fb8f45acc76 (patch) | |
tree | a17e1a767a89542ab59907462206d7dcf2e504b2 /tests/auto/qlibrary/lib2 | |
download | Qt-8f427b2b914d5b575a4a7c0ed65d2fb8f45acc76.zip Qt-8f427b2b914d5b575a4a7c0ed65d2fb8f45acc76.tar.gz Qt-8f427b2b914d5b575a4a7c0ed65d2fb8f45acc76.tar.bz2 |
Long live Qt for S60!
Diffstat (limited to 'tests/auto/qlibrary/lib2')
-rw-r--r-- | tests/auto/qlibrary/lib2/lib2.pro | 47 | ||||
-rw-r--r-- | tests/auto/qlibrary/lib2/mylib.c | 19 |
2 files changed, 66 insertions, 0 deletions
diff --git a/tests/auto/qlibrary/lib2/lib2.pro b/tests/auto/qlibrary/lib2/lib2.pro new file mode 100644 index 0000000..724077a --- /dev/null +++ b/tests/auto/qlibrary/lib2/lib2.pro @@ -0,0 +1,47 @@ +TEMPLATE = lib +CONFIG += dll +CONFIG -= staticlib +SOURCES = mylib.c +TARGET = mylib +DESTDIR = ../ +VERSION = 2 +QT = core + +wince*: DEFINES += WIN32_MSVC +win32-msvc: DEFINES += WIN32_MSVC +win32-borland: DEFINES += WIN32_BORLAND + +# Force a copy of the library to have an extension that is non-standard. +# We want to test if we can load a shared library with *any* filename... + +# For windows test if we can load a filename with multiple dots. +win32: { + QMAKE_POST_LINK = copy /Y ..\mylib2.dll ..\mylib.dl2 && \ + copy /Y ..\mylib2.dll ..\system.trolltech.test.mylib.dll +} + +unix:!symbian: { + QMAKE_POST_LINK = cp -f $(DESTDIR)$(TARGET) ../libmylib.so2 && \ + cp -f $(DESTDIR)$(TARGET) ../system.trolltech.test.mylib.so +} + +symbian-abld: { + TARGET.CAPABILITY=ALL -TCB + QMAKE_POST_LINK = \ + copy /Y $${EPOCROOT}epoc32\release\\$(PLATFORM)\\$(CFG)\mylib.dll $${EPOCROOT}epoc32\release\\$(PLATFORM)\\$(CFG)\mylib.dl2 && \ + copy /Y $${EPOCROOT}epoc32\release\\$(PLATFORM)\\$(CFG)\mylib.dll $${EPOCROOT}epoc32\release\\$(PLATFORM)\\$(CFG)\system.trolltech.test.mylib.dll && \ + IF NOT "$(PLATFORM)==WINSCW" copy /Y $${EPOCROOT}epoc32\release\\$(PLATFORM)\\$(CFG)\mylib.dll ..\tst\mylib.dl2 +} + +symbian-sbsv2: { + TARGET.CAPABILITY=ALL -TCB + QMAKE_POST_LINK = \ + $(GNUCP) $${EPOCROOT}epoc32/release/$(PLATFORM_PATH)/$(CFG_PATH)/mylib.dll $${EPOCROOT}epoc32/release/$(PLATFORM_PATH)/$(CFG_PATH)/mylib.dl2 && \ + $(GNUCP) $${EPOCROOT}epoc32/release/$(PLATFORM_PATH)/$(CFG_PATH)/mylib.dll $${EPOCROOT}epoc32/release/$(PLATFORM_PATH)/$(CFG_PATH)/system.trolltech.test.mylib.dll && \ + if test $(PLATFORM) != WINSCW;then $(GNUCP) $${EPOCROOT}epoc32/release/$(PLATFORM_PATH)/$(CFG_PATH)/mylib.dll $${PWD}/../tst/mylib.dl2; fi +} + +#no special install rule for the library used by test +INSTALLS = + + diff --git a/tests/auto/qlibrary/lib2/mylib.c b/tests/auto/qlibrary/lib2/mylib.c new file mode 100644 index 0000000..4046f1f --- /dev/null +++ b/tests/auto/qlibrary/lib2/mylib.c @@ -0,0 +1,19 @@ +#include <qglobal.h> + +#if defined(Q_CC_MSVC) || defined(Q_CC_MSVC_NET) || defined(Q_CC_BOR)|| defined(Q_OS_SYMBIAN) +#define LIB_EXPORT __declspec(dllexport) +#else +#define LIB_EXPORT +#endif + +#if defined(Q_CC_BOR) +# define BORLAND_STDCALL __stdcall +#else +# define BORLAND_STDCALL +#endif + +LIB_EXPORT int BORLAND_STDCALL mylibversion() +{ + return 2; +} + |