Skip to content

Commit

Permalink
[libcommhistory] Remove static library build
Browse files Browse the repository at this point in the history
Tests now use the shared library, and the static library is removed
entirely. To enable tests, CommHistory::Adaptor is now an exported
class, but shouldn't be normally used and shouldn't pose an ABI problem.
  • Loading branch information
John Brooks committed Jul 16, 2013
1 parent a6a3187 commit 417279e
Show file tree
Hide file tree
Showing 8 changed files with 86 additions and 163 deletions.
2 changes: 0 additions & 2 deletions rpm/libcommhistory-qt5.spec
Original file line number Diff line number Diff line change
Expand Up @@ -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/*

Expand Down
1 change: 0 additions & 1 deletion rpm/libcommhistory.spec
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ rm -rf %{buildroot}

%files devel
%defattr(-,root,root,-)
%{_libdir}/libcommhistory.a
%{_libdir}/pkgconfig/commhistory.pc
%{_includedir}/commhistory/CommHistory/*

Expand Down
3 changes: 2 additions & 1 deletion src/adaptor.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,11 @@
#include <QtDBus/QtDBus>
#include "event.h"
#include "group.h"
#include "libcommhistoryexport.h"

namespace CommHistory {

class Adaptor : public QDBusAbstractAdaptor
class LIBCOMMHISTORY_EXPORT Adaptor : public QDBusAbstractAdaptor
{
Q_OBJECT

Expand Down
102 changes: 0 additions & 102 deletions src/shared.pro

This file was deleted.

83 changes: 80 additions & 3 deletions src/src.pro
Original file line number Diff line number Diff line change
Expand Up @@ -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
50 changes: 0 additions & 50 deletions src/static.pro

This file was deleted.

4 changes: 2 additions & 2 deletions tests/performance_tests.pri
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
4 changes: 2 additions & 2 deletions tests/tests.pri
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 417279e

Please sign in to comment.