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})

# ######### QtTelepathyClient library #########

set(library_SRCS
    channel.cpp
    channelcontactlist.cpp
    channelcontactsearch.cpp
    channeldtmfinterface.cpp
    channelchatstateinterface.cpp
    channelgroupinterface.cpp
    channelholdinterface.cpp
    channelpasswordinterface.cpp
    channelroomlist.cpp
    channelstreamedmedia.cpp
    channeltext.cpp
    channeltransferinterface.cpp
    connection.cpp
    connectionaliasinginterface.cpp
    connectionavatarsinterface.cpp
    connectioncapabilitiesinterface.cpp
    connectioncontactinfointerface.cpp
    connectionforwardinginterface.cpp
    connectionmanager.cpp
    connectionpresenceinterface.cpp
    connectionprivacyinterface.cpp
    connectionrenaminginterface.cpp
    properties.cpp
    streamengine.cpp
    channelhandler.cpp
)

set(library_MOC_HDRS
    ${INC_DIR}/QtTelepathy/Client/channel.h
    ${INC_DIR}/QtTelepathy/Client/channelcontactlist.h
    ${INC_DIR}/QtTelepathy/Client/channelcontactsearch.h
    ${INC_DIR}/QtTelepathy/Client/channeldtmfinterface.h
    ${INC_DIR}/QtTelepathy/Client/channelchatstateinterface.h
    ${INC_DIR}/QtTelepathy/Client/channelgroupinterface.h
    ${INC_DIR}/QtTelepathy/Client/channelholdinterface.h
    ${INC_DIR}/QtTelepathy/Client/channelpasswordinterface.h
    ${INC_DIR}/QtTelepathy/Client/channelroomlist.h
    ${INC_DIR}/QtTelepathy/Client/channelstreamedmedia.h
    ${INC_DIR}/QtTelepathy/Client/channeltext.h
    ${INC_DIR}/QtTelepathy/Client/channeltransferinterface.h
    ${INC_DIR}/QtTelepathy/Client/connection.h
    ${INC_DIR}/QtTelepathy/Client/connectionaliasinginterface.h
    ${INC_DIR}/QtTelepathy/Client/connectionavatarsinterface.h
    ${INC_DIR}/QtTelepathy/Client/connectioncapabilitiesinterface.h
    ${INC_DIR}/QtTelepathy/Client/connectioncontactinfointerface.h
    ${INC_DIR}/QtTelepathy/Client/connectionforwardinginterface.h
    ${INC_DIR}/QtTelepathy/Client/connectionmanager.h
    ${INC_DIR}/QtTelepathy/Client/connectionpresenceinterface.h
    ${INC_DIR}/QtTelepathy/Client/connectionprivacyinterface.h
    ${INC_DIR}/QtTelepathy/Client/connectionrenaminginterface.h
    ${INC_DIR}/QtTelepathy/Client/properties.h
    ${INC_DIR}/QtTelepathy/Client/streamengine.h
    ${INC_DIR}/QtTelepathy/Client/channelhandler.h
)

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