diff --git a/rpm/libcommhistory-qt5.spec b/rpm/libcommhistory-qt5.spec index b5e9980..8be6d1b 100644 --- a/rpm/libcommhistory-qt5.spec +++ b/rpm/libcommhistory-qt5.spec @@ -104,8 +104,6 @@ rm -rf %{buildroot} %files devel %defattr(-,root,root,-) -%{_libdir}/libcommhistory-qt5.a -%{_libdir}/libcommhistory-qt5.prl %{_libdir}/pkgconfig/commhistory-qt5.pc %{_includedir}/commhistory-qt5/CommHistory/* diff --git a/rpm/libcommhistory.spec b/rpm/libcommhistory.spec index 717871e..b82bdda 100644 --- a/rpm/libcommhistory.spec +++ b/rpm/libcommhistory.spec @@ -101,7 +101,6 @@ rm -rf %{buildroot} %files devel %defattr(-,root,root,-) -%{_libdir}/libcommhistory.a %{_libdir}/pkgconfig/commhistory.pc %{_includedir}/commhistory/CommHistory/* diff --git a/src/adaptor.h b/src/adaptor.h index 6a597b8..c1ad63b 100644 --- a/src/adaptor.h +++ b/src/adaptor.h @@ -26,10 +26,11 @@ #include #include "event.h" #include "group.h" +#include "libcommhistoryexport.h" namespace CommHistory { -class Adaptor : public QDBusAbstractAdaptor +class LIBCOMMHISTORY_EXPORT Adaptor : public QDBusAbstractAdaptor { Q_OBJECT diff --git a/src/shared.pro b/src/shared.pro deleted file mode 100644 index 38969be..0000000 --- a/src/shared.pro +++ /dev/null @@ -1,102 +0,0 @@ -############################################################################### -# -# This file is part of libcommhistory. -# -# Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -# Contact: Reto Zingg -# -# This library is free software; you can redistribute it and/or modify it -# under the terms of the GNU Lesser General Public License version 2.1 as -# published by the Free Software Foundation. -# -# This library is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -# License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this library; if not, write to the Free Software Foundation, Inc., -# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# -############################################################################### - -# ----------------------------------------------------------------------------- -# libcommhistory/src/shared.pro -# ----------------------------------------------------------------------------- -!include( ../common-project-config.pri ) : \ - error( "Unable to include common-project-config.pri" ) -!include( ../common-vars.pri ) : \ - error( "Unable to include common-vars.pri" ) - -# ----------------------------------------------------------------------------- -# target setup -# ----------------------------------------------------------------------------- -TEMPLATE = lib -VERSION = $$LIBRARY_VERSION - -CONFIG += shared \ - debug - -QT += dbus sql - -equals(QT_MAJOR_VERSION, 4) { - TARGET = commhistory - CONFIG += mobility - MOBILITY += contacts -} - -equals(QT_MAJOR_VERSION, 5) { - TARGET = commhistory-qt5 - QT += contacts - DEFINES += USING_QTPIM -} - -DEFINES += LIBCOMMHISTORY_SHARED -QMAKE_CXXFLAGS += -fvisibility=hidden - -# ----------------------------------------------------------------------------- -# input -# ----------------------------------------------------------------------------- -QT_LIKE_HEADERS += headers/CallEvent \ - headers/CallModel \ - headers/ConversationModel \ - headers/Event \ - headers/EventModel \ - headers/MessagePart \ - headers/Group \ - headers/GroupModel \ - headers/ClassZeroSMSModel \ - headers/SingleEventModel \ - headers/Events \ - headers/Models \ - headers/DatabaseIO - -include(sources.pri) - -# ----------------------------------------------------------------------------- -# Installation target for API header files -# ----------------------------------------------------------------------------- -headers.files = $$HEADERS \ - $$QT_LIKE_HEADERS - -# ----------------------------------------------------------------------------- -# common installation setup -# NOTE: remember to set headers.files before this include to have the headers -# properly setup. -# ----------------------------------------------------------------------------- -!include( ../common-installs-config.pri ) : \ - error( "Unable to include common-installs-config.pri" ) - -# ----------------------------------------------------------------------------- -# Installation target for .pc file -# ----------------------------------------------------------------------------- -pkgconfig.files = $${TARGET}.pc -pkgconfig.path = $${INSTALL_PREFIX}/lib/pkgconfig -INSTALLS += pkgconfig - -# ----------------------------------------------------------------------------- -# End of file -# ----------------------------------------------------------------------------- - -OTHER_FILES += \ - sources.pri diff --git a/src/src.pro b/src/src.pro index 73a265a..38969be 100644 --- a/src/src.pro +++ b/src/src.pro @@ -20,6 +20,83 @@ # ############################################################################### -TEMPLATE = subdirs -CONFIG += ordered -SUBDIRS = shared.pro static.pro +# ----------------------------------------------------------------------------- +# libcommhistory/src/shared.pro +# ----------------------------------------------------------------------------- +!include( ../common-project-config.pri ) : \ + error( "Unable to include common-project-config.pri" ) +!include( ../common-vars.pri ) : \ + error( "Unable to include common-vars.pri" ) + +# ----------------------------------------------------------------------------- +# target setup +# ----------------------------------------------------------------------------- +TEMPLATE = lib +VERSION = $$LIBRARY_VERSION + +CONFIG += shared \ + debug + +QT += dbus sql + +equals(QT_MAJOR_VERSION, 4) { + TARGET = commhistory + CONFIG += mobility + MOBILITY += contacts +} + +equals(QT_MAJOR_VERSION, 5) { + TARGET = commhistory-qt5 + QT += contacts + DEFINES += USING_QTPIM +} + +DEFINES += LIBCOMMHISTORY_SHARED +QMAKE_CXXFLAGS += -fvisibility=hidden + +# ----------------------------------------------------------------------------- +# input +# ----------------------------------------------------------------------------- +QT_LIKE_HEADERS += headers/CallEvent \ + headers/CallModel \ + headers/ConversationModel \ + headers/Event \ + headers/EventModel \ + headers/MessagePart \ + headers/Group \ + headers/GroupModel \ + headers/ClassZeroSMSModel \ + headers/SingleEventModel \ + headers/Events \ + headers/Models \ + headers/DatabaseIO + +include(sources.pri) + +# ----------------------------------------------------------------------------- +# Installation target for API header files +# ----------------------------------------------------------------------------- +headers.files = $$HEADERS \ + $$QT_LIKE_HEADERS + +# ----------------------------------------------------------------------------- +# common installation setup +# NOTE: remember to set headers.files before this include to have the headers +# properly setup. +# ----------------------------------------------------------------------------- +!include( ../common-installs-config.pri ) : \ + error( "Unable to include common-installs-config.pri" ) + +# ----------------------------------------------------------------------------- +# Installation target for .pc file +# ----------------------------------------------------------------------------- +pkgconfig.files = $${TARGET}.pc +pkgconfig.path = $${INSTALL_PREFIX}/lib/pkgconfig +INSTALLS += pkgconfig + +# ----------------------------------------------------------------------------- +# End of file +# ----------------------------------------------------------------------------- + +OTHER_FILES += \ + sources.pri diff --git a/src/static.pro b/src/static.pro deleted file mode 100644 index d44b720..0000000 --- a/src/static.pro +++ /dev/null @@ -1,50 +0,0 @@ -############################################################################### -# -# This file is part of libcommhistory. -# -# Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -# Contact: Reto Zingg -# -# This library is free software; you can redistribute it and/or modify it -# under the terms of the GNU Lesser General Public License version 2.1 as -# published by the Free Software Foundation. -# -# This library is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -# License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this library; if not, write to the Free Software Foundation, Inc., -# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# -############################################################################### - -include( ../common-project-config.pri ) -include( ../common-vars.pri ) - -TEMPLATE = lib -CONFIG += static debug -MOBILITY += contacts -VERSION = $$LIBRARY_VERSION -DEFINES += LIBCOMMHISTORY_SHARED -QMAKE_CXXFLAGS += -fvisibility=hidden - -QT += dbus sql - -equals(QT_MAJOR_VERSION, 4) { - TARGET = commhistory - CONFIG += mobility - MOBILITY += contacts -} - -equals(QT_MAJOR_VERSION, 5) { - TARGET = commhistory-qt5 - CONFIG += create_prl - QT += contacts - DEFINES += USING_QTPIM -} - -include(sources.pri) - -include( ../common-installs-config.pri ) diff --git a/tests/performance_tests.pri b/tests/performance_tests.pri index 273344f..564b83a 100644 --- a/tests/performance_tests.pri +++ b/tests/performance_tests.pri @@ -26,12 +26,12 @@ INCLUDEPATH += . ../../src .. DEPENDPATH += $${INCLUDEPATH} equals(QT_MAJOR_VERSION, 4) { - LIBS += ../../src/libcommhistory.a + LIBS += ../../src/libcommhistory.so CONFIG += mobility MOBILITY += contacts } equals(QT_MAJOR_VERSION, 5) { - LIBS += ../../src/libcommhistory-qt5.a + LIBS += ../../src/libcommhistory-qt5.so QT += contacts DEFINES += USING_QTPIM } diff --git a/tests/tests.pri b/tests/tests.pri index 5b2c0b5..96f2159 100644 --- a/tests/tests.pri +++ b/tests/tests.pri @@ -26,12 +26,12 @@ INCLUDEPATH += . ../../src .. DEPENDPATH += $${INCLUDEPATH} equals(QT_MAJOR_VERSION, 4) { - LIBS += ../../src/libcommhistory.a + LIBS += ../../src/libcommhistory.so CONFIG += mobility MOBILITY += contacts } equals(QT_MAJOR_VERSION, 5) { - LIBS += ../../src/libcommhistory-qt5.a + LIBS += ../../src/libcommhistory-qt5.so QT += contacts DEFINES += USING_QTPIM }