CMakeLists.txt 2.61 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)

ADD_DEFINITIONS(
	${QT_DEFINITIONS} 
	-fexceptions
)

PROJECT(qtsflphone)

#target_link_libraries(qtsflphone ${QT_QTCORE_LIBRARY} ${KDE4_KDEUI_LIBS})

SET(LOCAL_CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/")
SET(CMAKE_MODULE_PATH "${LOCAL_CMAKE_MODULE_PATH}")

FIND_PACKAGE ( KDE4 REQUIRED )
FIND_PACKAGE ( Qt4 REQUIRED )

INCLUDE ( KDE4Defaults )

set(GENERIC_LIB_VERSION "0.9.8")

22
INCLUDE_DIRECTORIES ( ${QT_INCLUDES} ${CMAKE_CURRENT_BINARY_DIR})
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114



#File to compile
set( qtsflphone_LIB_SRCS
  Call.cpp
  Account.cpp
  AccountList.cpp
  CallModel.cpp
  Contact.cpp
  Item.cpp
  configurationmanager_interface_singleton.cpp
  callmanager_interface_singleton.cpp
  instance_interface_singleton.cpp
  sflphone_const.h
)

# Build dbus interfaces
SET ( dbus_xml_introspecs_path ${CMAKE_CURRENT_SOURCE_DIR}/dbus/)

# configuration manager interface
SET ( configurationmanager_xml  ${dbus_xml_introspecs_path}/configurationmanager-introspec.xml )

SET_SOURCE_FILES_PROPERTIES(
   ${configurationmanager_xml}
   PROPERTIES 
   CLASSNAME ConfigurationManagerInterface
   INCLUDE "${CMAKE_CURRENT_SOURCE_DIR}/dbus/metatypes.h") 

QT4_ADD_DBUS_INTERFACE(
   qtsflphone_LIB_SRCS
   ${configurationmanager_xml}
   configurationmanager_dbus_interface)

# call manager interface
SET ( callmanager_xml  ${dbus_xml_introspecs_path}/callmanager-introspec.xml )

SET_SOURCE_FILES_PROPERTIES(
   ${callmanager_xml}
   PROPERTIES 
   CLASSNAME CallManagerInterface
   INCLUDE "${CMAKE_CURRENT_SOURCE_DIR}/dbus/metatypes.h") 

QT4_ADD_DBUS_INTERFACE(
   qtsflphone_LIB_SRCS
   ${callmanager_xml}
   callmanager_dbus_interface)

# instance interface
SET ( instance_xml  ${dbus_xml_introspecs_path}/instance-introspec.xml )

SET_SOURCE_FILES_PROPERTIES(
   ${instance_xml}
   PROPERTIES 
   CLASSNAME InstanceInterface
   INCLUDE "${CMAKE_CURRENT_SOURCE_DIR}/dbus/metatypes.h") 
   
QT4_ADD_DBUS_INTERFACE(
   qtsflphone_LIB_SRCS
   ${instance_xml}
   instance_dbus_interface)
 
kde4_add_library( qtsflphone  SHARED ${qtsflphone_LIB_SRCS} )
 
target_link_libraries( qtsflphone
  ${QT_QTDBUS_LIBRARY}
  ${QT_QTCORE_LIBRARY}
)

set_target_properties( qtsflphone
  PROPERTIES VERSION ${GENERIC_LIB_VERSION} SOVERSION ${GENERIC_LIB_SOVERSION}
)

set( qtsflphone_LIB_HDRS
  Account.h
  AccountList.h
  Call.h  
  CallModel.h
  Contact.h  
  Item.h  
  configurationmanager_interface_singleton.h
  callmanager_interface_singleton.h
  instance_interface_singleton.h
  sflphone_const.h
)

install( FILES ${qtsflphone_LIB_HDRS}
  DESTINATION ${INCLUDE_INSTALL_DIR}/qtsflphone
  COMPONENT Devel
)
 
install( TARGETS qtsflphone  ${INSTALL_TARGETS_DEFAULT_ARGS} )