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

set(INC_DIR ${CMAKE_SOURCE_DIR}/include)
include_directories(${INC_DIR} ${QT_QTCORE_INCLUDE_DIR} ${QTDBUS_CFLAGS})

# ######### QtTelepathy library #########

set(library_SRCS
    channel.cpp
    channelcontactlist.cpp
    channelcontactsearch.cpp
    channelcontactsearchtypes.cpp
    channeldtmfinterface.cpp
    channelgroupinterface.cpp
    channelholdinterface.cpp
    channelpasswordinterface.cpp
    channelroomlist.cpp
    channelroomlisttypes.cpp
    channelstreamedmedia.cpp
    channelstreamedmediatypes.cpp
    channeltext.cpp
    channeltexttypes.cpp
    channeltransferinterface.cpp
    connection.cpp
    connectiontypes.cpp
    connectionaliasinginterface.cpp
    connectionaliasinginterfacetypes.cpp
    connectionavatarsinterface.cpp
    connectioncapabilitiesinterface.cpp
    connectioncapabilitiesinterfacetypes.cpp
    connectioncontactinfointerface.cpp
    connectionforwardinginterface.cpp
    connectionmanager.cpp
    connectionmanagertypes.cpp
    connectionpresenceinterface.cpp
    connectionpresenceinterfacetypes.cpp
    connectionprivacyinterface.cpp
    connectionrenaminginterface.cpp
    properties.cpp
    propertiestypes.cpp
)

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

QT4_WRAP_CPP(library_MOC_SRCS ${library_MOC_HDRS})

add_library(QtTelepathy SHARED ${library_SRCS} ${library_MOC_SRCS})
set_target_properties(QtTelepathy PROPERTIES VERSION 0.1.0 SOVERSION 0)
target_link_libraries(QtTelepathy ${QT_LIBRARIES} ${QDBUS_LDFLAGS})
install(TARGETS QtTelepathy DESTINATION lib)

