set(QT_DONT_USE_QTGUI "YES")
include(${QT_USE_FILE})

set(INC_DIR ${CMAKE_SOURCE_DIR}/include)
link_directories(${CMAKE_BINARY_DIR/src/Common})
include_directories(${INC_DIR} ${QT_QTCORE_INCLUDE_DIR} ${QTDBUS_CFLAGS})

# ######### QtTelepathyCore library #########

set(library_SRCS
    channeladaptor.cpp
    channelcontactsearchadaptor.cpp
    channelinterfacedtmfadaptor.cpp
    channelinterfacegroupadaptor.cpp
    channelinterfaceholdadaptor.cpp
    channelinterfacepasswordadaptor.cpp
    channelinterfacetransferadaptor.cpp
    channelroomlistadaptor.cpp
    channelstreamedmediaadaptor.cpp
    channeltypetextadaptor.cpp
    connectionadaptor.cpp
    connectioninterfacealiasingadaptor.cpp
    connectioninterfaceavatarsadaptor.cpp
    connectioninterfacecapabilitiesadaptor.cpp
    connectioninterfacecontactinfoadaptor.cpp
    connectioninterfaceforwardingadaptor.cpp
    connectioninterfacepresenceadaptor.cpp
    connectioninterfaceprivacyadaptor.cpp
    connectioninterfacerenamingadaptor.cpp
    connectionmanageradaptor.cpp
    propertiesadaptor.cpp
)

set(library_MOC_HDRS
    ${INC_DIR}/QtTelepathy/Core/channeladaptor.h
    ${INC_DIR}/QtTelepathy/Core/channelcontactsearchadaptor.h
    ${INC_DIR}/QtTelepathy/Core/channelinterfacedtmfadaptor.h
    ${INC_DIR}/QtTelepathy/Core/channelinterfacegroupadaptor.h
    ${INC_DIR}/QtTelepathy/Core/channelinterfaceholdadaptor.h
    ${INC_DIR}/QtTelepathy/Core/channelinterfacepasswordadaptor.h
    ${INC_DIR}/QtTelepathy/Core/channelinterfacetransferadaptor.h
    ${INC_DIR}/QtTelepathy/Core/channelroomlistadaptor.h
    ${INC_DIR}/QtTelepathy/Core/channelstreamedmediaadaptor.h
    ${INC_DIR}/QtTelepathy/Core/channeltypetextadaptor.h
    ${INC_DIR}/QtTelepathy/Core/connectionadaptor.h
    ${INC_DIR}/QtTelepathy/Core/connectioninterfacealiasingadaptor.h
    ${INC_DIR}/QtTelepathy/Core/connectioninterfaceavatarsadaptor.h
    ${INC_DIR}/QtTelepathy/Core/connectioninterfacecapabilitiesadaptor.h
    ${INC_DIR}/QtTelepathy/Core/connectioninterfacecontactinfoadaptor.h
    ${INC_DIR}/QtTelepathy/Core/connectioninterfaceforwardingadaptor.h
    ${INC_DIR}/QtTelepathy/Core/connectioninterfacepresenceadaptor.h
    ${INC_DIR}/QtTelepathy/Core/connectioninterfaceprivacyadaptor.h
    ${INC_DIR}/QtTelepathy/Core/connectioninterfacerenamingadaptor.h
    ${INC_DIR}/QtTelepathy/Core/connectionmanageradaptor.h
    ${INC_DIR}/QtTelepathy/Core/propertiesadaptor.h
)

qt4_wrap_cpp(library_MOC_SRCS ${library_MOC_HDRS})
add_library(QtTelepathyCore SHARED ${library_SRCS} ${library_MOC_SRCS})
set_target_properties(QtTelepathyCore PROPERTIES VERSION 0.1.0 SOVERSION 0)
target_link_libraries(QtTelepathyCore QtTelepathyCommon ${QT_LIBRARIES} ${QDBUS_LDFLAGS})
install(TARGETS QtTelepathyCore DESTINATION ${LIB_INSTALL_DIR})

