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

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

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

set(common_SRCS
    ${common_DIR}/channel_interface_call_state_types_gen.cpp
    ${common_DIR}/channel_interface_chat_state_types_gen.cpp
    ${common_DIR}/channel_interface_dtmf_types_gen.cpp
    ${common_DIR}/channel_interface_group_types_gen.cpp
    ${common_DIR}/channel_interface_hold_types_gen.cpp
    ${common_DIR}/channel_interface_media_signalling_types_gen.cpp
    ${common_DIR}/channel_interface_password_types_gen.cpp
    ${common_DIR}/channel_type_room_list_types_gen.cpp
    ${common_DIR}/channel_type_streamed_media_types_gen.cpp
    ${common_DIR}/channel_type_text_types_gen.cpp
    ${common_DIR}/channel_type_tubes_types_gen.cpp
    ${common_DIR}/connection_interface_aliasing_types_gen.cpp
    ${common_DIR}/connection_interface_capabilities_types_gen.cpp
    ${common_DIR}/connection_interface_presence_types_gen.cpp
    ${common_DIR}/connection_manager_types_gen.cpp
    ${common_DIR}/connection_types_gen.cpp
    ${common_DIR}/media_stream_handler_types_gen.cpp
    ${common_DIR}/properties_interface_types_gen.cpp
    ${common_DIR}/types.cpp
)

set(library_SRCS
    ${common_SRCS}
    channel.cpp
    channel_interface_call_merging.cpp
    channel_interface_call_state.cpp
    channel_interface_chat_state.cpp
    channel_interface_dtmf.cpp
    channel_interface_group.cpp
    channel_interface_hold.cpp
    channel_interface_media_signalling.cpp
    channel_interface_password.cpp
    channel_interface_transfer.cpp
    channel_type_contact_list.cpp
    channel_type_room_list.cpp
    channel_type_streamed_media.cpp
    channel_type_text.cpp
    channel_type_tubes.cpp
    connection.cpp
    connection_interface_aliasing.cpp
    connection_interface_avatars.cpp
    connection_interface_capabilities.cpp
    connection_interface_forwarding.cpp
    connection_interface_presence.cpp
    connection_interface_privacy.cpp
    connection_interface_renaming.cpp
    connection_manager.cpp
    media_stream_handler.cpp
    properties_interface.cpp
)

set(library_MOC_HDRS
    ${INC_DIR}/QtTelepathy/Client/channel.h
    ${INC_DIR}/QtTelepathy/Client/channel_interface_call_merging.h
    ${INC_DIR}/QtTelepathy/Client/channel_interface_call_state.h
    ${INC_DIR}/QtTelepathy/Client/channel_interface_chat_state.h
    ${INC_DIR}/QtTelepathy/Client/channel_interface_dtmf.h
    ${INC_DIR}/QtTelepathy/Client/channel_interface_group.h
    ${INC_DIR}/QtTelepathy/Client/channel_interface_hold.h
    ${INC_DIR}/QtTelepathy/Client/channel_interface_media_signalling.h
    ${INC_DIR}/QtTelepathy/Client/channel_interface_password.h
    ${INC_DIR}/QtTelepathy/Client/channel_interface_transfer.h
    ${INC_DIR}/QtTelepathy/Client/channel_type_contact_list.h
    ${INC_DIR}/QtTelepathy/Client/channel_type_room_list.h
    ${INC_DIR}/QtTelepathy/Client/channel_type_streamed_media.h
    ${INC_DIR}/QtTelepathy/Client/channel_type_text.h
    ${INC_DIR}/QtTelepathy/Client/channel_type_tubes.h
    ${INC_DIR}/QtTelepathy/Client/client_export.h
    ${INC_DIR}/QtTelepathy/Client/connection.h
    ${INC_DIR}/QtTelepathy/Client/connection_interface_aliasing.h
    ${INC_DIR}/QtTelepathy/Client/connection_interface_avatars.h
    ${INC_DIR}/QtTelepathy/Client/connection_interface_capabilities.h
    ${INC_DIR}/QtTelepathy/Client/connection_interface_forwarding.h
    ${INC_DIR}/QtTelepathy/Client/connection_interface_presence.h
    ${INC_DIR}/QtTelepathy/Client/connection_interface_privacy.h
    ${INC_DIR}/QtTelepathy/Client/connection_interface_renaming.h
    ${INC_DIR}/QtTelepathy/Client/connection_manager.h
    ${INC_DIR}/QtTelepathy/Client/media_stream_handler.h
    ${INC_DIR}/QtTelepathy/Client/properties_interface.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 ${VERSION} SOVERSION ${SO_VERSION})
target_link_libraries(QtTelepathyClient ${QT_LIBRARIES} ${QDBUS_LDFLAGS})
install(TARGETS QtTelepathyClient DESTINATION lib)
