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

# ######### QtTelepathyCommon 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_interface_call_state_types_gen.cpp
    channel_interface_chat_state_types_gen.cpp
    channel_interface_dtmf_types_gen.cpp
    channel_interface_group_types_gen.cpp
    channel_interface_hold_types_gen.cpp
    channel_interface_media_signalling_types_gen.cpp
    channel_interface_password_types_gen.cpp
    channel_type_room_list_types_gen.cpp
    channel_type_streamed_media_types_gen.cpp
    channel_type_text_types_gen.cpp
    channel_type_tubes_types_gen.cpp
    connection_interface_aliasing_types_gen.cpp
    connection_interface_capabilities_types_gen.cpp
    connection_interface_presence_types_gen.cpp
    connection_manager_types_gen.cpp
    connection_types_gen.cpp
    media_stream_handler_types_gen.cpp
    properties_interface_types_gen.cpp
    types.cpp
)

SET(library_MOC_HDRS
    ${INC_DIR}/QtTelepathy/Common/channel_interface_call_state_types_gen.h
    ${INC_DIR}/QtTelepathy/Common/channel_interface_call_state_types.h
    ${INC_DIR}/QtTelepathy/Common/channel_interface_chat_state_types_gen.h
    ${INC_DIR}/QtTelepathy/Common/channel_interface_chat_state_types.h
    ${INC_DIR}/QtTelepathy/Common/channel_interface_dtmf_types_gen.h
    ${INC_DIR}/QtTelepathy/Common/channel_interface_dtmf_types.h
    ${INC_DIR}/QtTelepathy/Common/channel_interface_group_types_gen.h
    ${INC_DIR}/QtTelepathy/Common/channel_interface_group_types.h
    ${INC_DIR}/QtTelepathy/Common/channel_interface_hold_types_gen.h
    ${INC_DIR}/QtTelepathy/Common/channel_interface_hold_types.h
    ${INC_DIR}/QtTelepathy/Common/channel_interface_media_signalling_types_gen.h
    ${INC_DIR}/QtTelepathy/Common/channel_interface_media_signalling_types.h
    ${INC_DIR}/QtTelepathy/Common/channel_interface_password_types_gen.h
    ${INC_DIR}/QtTelepathy/Common/channel_interface_password_types.h
    ${INC_DIR}/QtTelepathy/Common/channel_type_room_list_types_gen.h
    ${INC_DIR}/QtTelepathy/Common/channel_type_room_list_types.h
    ${INC_DIR}/QtTelepathy/Common/channel_type_streamed_media_types_gen.h
    ${INC_DIR}/QtTelepathy/Common/channel_type_streamed_media_types.h
    ${INC_DIR}/QtTelepathy/Common/channel_type_text_types_gen.h
    ${INC_DIR}/QtTelepathy/Common/channel_type_text_types.h
    ${INC_DIR}/QtTelepathy/Common/channel_type_tubes_types_gen.h
    ${INC_DIR}/QtTelepathy/Common/channel_type_tubes_types.h
    ${INC_DIR}/QtTelepathy/Common/common_export.h
    ${INC_DIR}/QtTelepathy/Common/connection_interface_aliasing_types_gen.h
    ${INC_DIR}/QtTelepathy/Common/connection_interface_aliasing_types.h
    ${INC_DIR}/QtTelepathy/Common/connection_interface_capabilities_types_gen.h
    ${INC_DIR}/QtTelepathy/Common/connection_interface_capabilities_types.h
    ${INC_DIR}/QtTelepathy/Common/connection_interface_presence_types_gen.h
    ${INC_DIR}/QtTelepathy/Common/connection_interface_presence_types.h
    ${INC_DIR}/QtTelepathy/Common/connection_manager_types_gen.h
    ${INC_DIR}/QtTelepathy/Common/connection_manager_types.h
    ${INC_DIR}/QtTelepathy/Common/connection_types_gen.h
    ${INC_DIR}/QtTelepathy/Common/connection_types.h
    ${INC_DIR}/QtTelepathy/Common/generic_types_gen.h
    ${INC_DIR}/QtTelepathy/Common/generic_types.h
    ${INC_DIR}/QtTelepathy/Common/media_stream_handler_types_gen.h
    ${INC_DIR}/QtTelepathy/Common/media_stream_handler_types.h
    ${INC_DIR}/QtTelepathy/Common/properties_interface_types_gen.h
    ${INC_DIR}/QtTelepathy/Common/properties_interface_types.h
    ${INC_DIR}/QtTelepathy/Common/types.h

)
QT4_WRAP_CPP(library_MOC_SRCS ${library_MOC_HDRS})
ADD_LIBRARY(QtTelepathyCommon SHARED ${library_SRCS} ${library_MOC_SRCS})
SET_TARGET_PROPERTIES(QtTelepathyCommon PROPERTIES VERSION ${VERSION} SOVERSION ${SO_VERSION})
TARGET_LINK_LIBRARIES(QtTelepathyCommon ${QT_LIBRARIES})
INSTALL(TARGETS QtTelepathyCommon DESTINATION lib)
