SET(QT_DONT_USE_QTGUI ON)
SET(QT_USE_QTXML ON)
INCLUDE(${QT_USE_FILE})

INCLUDE_DIRECTORIES(${QT_QTCORE_INCLUDE_DIR}
                    ${TELEPATHY_QT_INCLUDE_DIR}
                    ${TAPIOCA_QT_INCLUDE_DIR}
                    ${CMAKE_CURRENT_BINARY_DIR}
                    ${CMAKE_CURRENT_SOURCE_DIR}
                    ${CMAKE_SOURCE_DIR}/include
)
# ######### Decibel Plugin Helper Library #########

SET(decibel_pluginhelper_SRCS
    accountconnectorbase.cpp
    accountdataserialization.cpp
    contactconnectorbase.cpp
)

SET(decibel_pluginhelper_MOC_HDRS
    accountconnectorbase.h
    contactconnectorbase.h
)

SET(decibel_pluginhelper_INSTALL_HDRS
    accountdataserialization.h
)

QT4_WRAP_CPP(decibel_pluginhelper_MOC_SRCS ${decibel_pluginhelper_MOC_HDRS})

ADD_LIBRARY(decibel_pluginhelper SHARED
            ${decibel_pluginhelper_SRCS}
            ${decibel_pluginhelper_MOC_SRCS}
)
TARGET_LINK_LIBRARIES(decibel_pluginhelper
                      ${QT_LIBRARIES}
                      ${TAPIOCA_QT_LIBRARIES}
)

SET_TARGET_PROPERTIES(decibel_pluginhelper
                      PROPERTIES VERSION ${VERSION}
                                 SOVERSION ${SO_VERSION}
)

# Install:
INSTALL(TARGETS decibel_pluginhelper DESTINATION ${LIB_INSTALL_DIR})

INSTALL(FILES ${decibel_pluginhelper_MOC_HDRS}
              ${decibel_pluginhelper_INSTALL_HDRS}
        DESTINATION ${INCLUDE_INSTALL_DIR}
)
