-
Notifications
You must be signed in to change notification settings - Fork 5
/
CMakeLists.txt
83 lines (67 loc) · 2.34 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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
# to compile the plugin out of
# kopete source tree
if(CMAKE_SOURCE_DIR STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}")
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules")
find_package(KDE4 REQUIRED)
find_package(Qt4 REQUIRED)
INCLUDE_DIRECTORIES(${QT4_INCLUDE_DIR})
INCLUDE_DIRECTORIES(${QT_QTCORE_INCLUDE_DIR})
INCLUDE_DIRECTORIES(${QT_QTGUI_INCLUDE_DIR})
INCLUDE_DIRECTORIES(${QT_QTNETWORK_INCLUDE_DIR})
INCLUDE_DIRECTORIES(${KDE4_INCLUDE_DIR})
INCLUDE_DIRECTORIES(${KDE4_INCLUDES})
include (KDE4Defaults)
include (MacroLibrary)
find_path(KOPETE_INCLUDE_DIR
NAME kopeteversion.h
PATH_SUFFIXES kopete
HINTS
${INCLUDE_INSTALL_DIR}
${KDE4_INCLUDE_DIR}
)
if(KOPETE_INCLUDE_DIR)
MESSAGE("Found Kopete: includes - ${KOPETE_INCLUDE_DIR}")
else(KOPETE_INCLUDE_DIR)
MESSAGE(FATAL_ERROR "Kopete headers not found")
endif(KOPETE_INCLUDE_DIR)
mark_as_advanced(KOPETE_INCLUDE_DIR)
endif(CMAKE_SOURCE_DIR STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}")
find_package(QJson REQUIRED)
add_subdirectory( icons )
include_directories(
${KOPETE_INCLUDE_DIR}
${KOPETE_INCLUDE_DIR}/ui
${CMAKE_CURRENT_SOURCE_DIR}/ui/
${QJSON_INCLUDE_DIR}
)
set(facebook_SRCS
facebook/chatservice.cpp
facebook/buddyinfo.cpp
facebook/chatmessage.cpp
)
set(kopete_facebook_PART_SRCS
facebookprotocol.cpp
facebookcontact.cpp
facebookaccount.cpp
facebookchatsession.cpp
facebookaddcontactpage.cpp
facebookeditaccountwidget.cpp
${facebook_SRCS}
)
kde4_add_ui_files(kopete_facebook_PART_SRCS
ui/facebookinfo.ui
ui/facebookadd.ui
ui/facebookaccountpreferences.ui
)
kde4_add_plugin(kopete_facebook ${kopete_facebook_PART_SRCS})
#QT4_AUTOMOC(${facebook_SRCS})
kde4_add_executable(facebooktest test.cpp ${facebook_SRCS})
target_link_libraries(facebooktest kopete ${QJSON_LIBRARIES} ${QT_QTNETWORK_LIBRARY} ${QT_QTGUI_LIBRARY} ${QT_CORE_LIBRARY})
if(WIN32)
target_link_libraries(kopete_facebook ${KDE4_KIO_LIBS} kopete ${QJSON_LIBRARIES} ${QT_QTNETWORK_LIBRARY})
else(WIN32)
target_link_libraries(kopete_facebook ${KDE4_KIO_LIBS} kopete kopete_videodevice ${QJSON_LIBRARIES} ${QT_QTNETWORK_LIBRARY} ${QT_QTGUI_LIBRARY} ${QT_CORE_LIBRARY})
endif(WIN32)
install(TARGETS kopete_facebook DESTINATION ${PLUGIN_INSTALL_DIR})
########### install files ###############
install( FILES kopete_facebook.desktop DESTINATION ${SERVICES_INSTALL_DIR})