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

INCLUDE_DIRECTORIES(${INC_DIR} ${QT_QTCORE_INCLUDE_DIR} ${QT_QTDBUS_INCLUDE_DIR})

# ######### QtTelepathyCore 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_adaptor.cpp
    channel_interface_call_merging_adaptor.cpp
    channel_interface_call_state_adaptor.cpp
    channel_interface_chat_state_adaptor.cpp
    channel_interface_dtmf_adaptor.cpp
    channel_interface_group_adaptor.cpp
    channel_interface_hold_adaptor.cpp
    channel_interface_media_signalling_adaptor.cpp
    channel_interface_password_adaptor.cpp
    channel_interface_transfer_adaptor.cpp
    channel_type_contact_list_adaptor.cpp
    channel_type_room_list_adaptor.cpp
    channel_type_streamed_media_adaptor.cpp
    channel_type_text_adaptor.cpp
    channel_type_tubes_adaptor.cpp
    connection_adaptor.cpp
    connection_interface_aliasing_adaptor.cpp
    connection_interface_avatars_adaptor.cpp
    connection_interface_capabilities_adaptor.cpp
    connection_interface_forwarding_adaptor.cpp
    connection_interface_presence_adaptor.cpp
    connection_interface_privacy_adaptor.cpp
    connection_interface_renaming_adaptor.cpp
    connection_manager_adaptor.cpp
    media_stream_handler_adaptor.cpp
    properties_interface_adaptor.cpp
)

SET(library_MOC_HDRS
    ${INC_DIR}/QtTelepathy/Core/channel_adaptor.h
    ${INC_DIR}/QtTelepathy/Core/channel_interface_call_merging_adaptor.h
    ${INC_DIR}/QtTelepathy/Core/channel_interface_call_state_adaptor.h
    ${INC_DIR}/QtTelepathy/Core/channel_interface_chat_state_adaptor.h
    ${INC_DIR}/QtTelepathy/Core/channel_interface_dtmf_adaptor.h
    ${INC_DIR}/QtTelepathy/Core/channel_interface_group_adaptor.h
    ${INC_DIR}/QtTelepathy/Core/channel_interface_hold_adaptor.h
    ${INC_DIR}/QtTelepathy/Core/channel_interface_media_signalling_adaptor.h
    ${INC_DIR}/QtTelepathy/Core/channel_interface_password_adaptor.h
    ${INC_DIR}/QtTelepathy/Core/channel_interface_transfer_adaptor.h
    ${INC_DIR}/QtTelepathy/Core/channel_type_contact_list_adaptor.h
    ${INC_DIR}/QtTelepathy/Core/channel_type_room_list_adaptor.h
    ${INC_DIR}/QtTelepathy/Core/channel_type_streamed_media_adaptor.h
    ${INC_DIR}/QtTelepathy/Core/channel_type_text_adaptor.h
    ${INC_DIR}/QtTelepathy/Core/channel_type_tubes_adaptor.h
    ${INC_DIR}/QtTelepathy/Core/connection_adaptor.h
    ${INC_DIR}/QtTelepathy/Core/connection_interface_aliasing_adaptor.h
    ${INC_DIR}/QtTelepathy/Core/connection_interface_avatars_adaptor.h
    ${INC_DIR}/QtTelepathy/Core/connection_interface_capabilities_adaptor.h
    ${INC_DIR}/QtTelepathy/Core/connection_interface_forwarding_adaptor.h
    ${INC_DIR}/QtTelepathy/Core/connection_interface_presence_adaptor.h
    ${INC_DIR}/QtTelepathy/Core/connection_interface_privacy_adaptor.h
    ${INC_DIR}/QtTelepathy/Core/connection_interface_renaming_adaptor.h
    ${INC_DIR}/QtTelepathy/Core/connection_manager_adaptor.h
    ${INC_DIR}/QtTelepathy/Core/media_stream_handler_adaptor.h
    ${INC_DIR}/QtTelepathy/Core/properties_interface_adaptor.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 ${VERSION} SOVERSION ${SO_VERSION})
TARGET_LINK_LIBRARIES(QtTelepathyCore ${QT_LIBRARIES})
INSTALL(TARGETS QtTelepathyCore DESTINATION lib)
