blob: e3a03dba17d272c4b52f5f7f627a0d81e4955b81 (
plain)
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
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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
|
### ------- sub dirs -------
ADD_SUBDIRECTORY( data )
add_subdirectory(bookmarks)
add_subdirectory(settings)
add_subdirectory(plugins)
### ------- sources --------
set(rekonqwindow_SRCS
rekonqwindow_class.cpp rekonqwindow.hpp rekonqwindow.ui
tabbar/tabbar.cpp tabbar/tabbar.h
urlbar/urlbar.cpp urlbar/urlbar.hpp urlbar/completer.cpp urlbar/completer.hpp
panels/bookmarkspanel.cpp panels/bookmarkspanel.hpp
)
set(rekonqwindow_IFACES ${PROJECT_SOURCE_DIR}/include/rview.hpp)
# rekonq
set(rekonq_SRCS
#----------------------------------------
main.cpp application.cpp application_instance.cpp application.hpp
taskmanager.cpp taskmanager.h taskmanager.ui
#----------------------------------------
rekonqwindow.cpp ${rekonqwindow_SRCS}
#----------------------------------------
)
if(${CMAKE_BUILD_TYPE} STREQUAL "Debug")
list(APPEND rekonq_SRCS test/rview_fake.cpp test/rview_fake.h test/rview_fake.ui)
endif()
list(TRANSFORM rekonq_SRCS PREPEND src/)
set(rekonq_SRCS ${rekonq_SRCS} ${rekonqwindow_IFACES})
set(rekonq_SRCS ${rekonq_SRCS} PARENT_SCOPE)
# Nepomuk OPTIONAL src files
IF(NepomukCore_FOUND)
SET( rekonq_KDEINIT_SRCS
${rekonq_KDEINIT_SRCS}
urlbar/resourcelinkdialog.cpp
urlbar/newresourcedialog.cpp
nepomuk/utils/simpleresourcemodel.cpp
nepomuk/utils/resourcemodel.cpp
)
ENDIF(NepomukCore_FOUND)
# Opera sync optional src files
IF(HAVE_QCA2 AND HAVE_QTOAUTH)
SET( rekonq_KDEINIT_SRCS
${rekonq_KDEINIT_SRCS}
sync/operasynchandler.cpp
)
ENDIF(HAVE_QCA2 AND HAVE_QTOAUTH)
### ------------- INCLUDING DIRECTORIES...
# Nepomuk optional include directories
IF(SOPRANO_FOUND AND NepomukCore_FOUND)
INCLUDE_DIRECTORIES(${SOPRANO_INCLUDE_DIR}
${NEPOMUK_CORE_INCLUDE_DIR}
)
FIND_PACKAGE(Soprano REQUIRED)
INCLUDE(SopranoAddOntology)
ENDIF(SOPRANO_FOUND AND NepomukCore_FOUND)
# Opera sync optional include directories
IF(HAVE_QCA2 AND HAVE_QTOAUTH)
INCLUDE_DIRECTORIES(${QCA2_INCLUDE_DIR}
${QTOAUTH_INCLUDE_DIR}
)
ENDIF(HAVE_QCA2 AND HAVE_QTOAUTH)
# KActivities optional include directories
IF(KActivities_FOUND)
INCLUDE_DIRECTORIES(${KACTIVITIES_INCLUDE_DIRS}
)
ENDIF(KActivities_FOUND)
### -------------- ADDING APPLICATION ICON...
#KDE4_ADD_APP_ICON( rekonq_KDEINIT_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/../icons/hi*-app-rekonq.png )
### -------------- ADDING APPLICATION KCFG FILES...
#KDE4_ADD_KCFG_FILES( rekonq_KDEINIT_SRCS rekonq.kcfgc )
### --------------- TARGETTING LINK LIBRARIES...
# Nepomuk optional target link libraries
IF(SOPRANO_FOUND AND NepomukCore_FOUND)
TARGET_LINK_LIBRARIES( kdeinit_rekonq
${NEPOMUK_CORE_LIBRARY}
${SOPRANO_LIBRARIES}
)
ENDIF(SOPRANO_FOUND AND NepomukCore_FOUND)
# KActivities optional target link libraries
IF(HAVE_KACTIVITIES)
TARGET_LINK_LIBRARIES( kdeinit_rekonq
${KACTIVITIES_LIBRARY}
)
ENDIF(HAVE_KACTIVITIES)
# Opera sync optional link libraries
IF(HAVE_QCA2 AND HAVE_QTOAUTH)
TARGET_LINK_LIBRARIES( kdeinit_rekonq
${QCA2_LIBRARY}
${QTOAUTH_LIBRARY}
)
ENDIF(HAVE_QCA2 AND HAVE_QTOAUTH)
# tests
if(${CMAKE_BUILD_TYPE} STREQUAL "Debug")
# application test
add_executable(test_application test/test_application.cpp test/application_mock.hpp
application_instance.cpp application.hpp)
target_compile_definitions(test_application PRIVATE REKONQ_TEST)
target_link_libraries(test_application GTest::gtest GTest::gmock GTest::gtest_main SingleApplication::SingleApplication)
gtest_discover_tests(test_application)
# rekonqwindow test
add_executable(test_rekonqwindow test/test_rekonqwindow.cpp test/rekonqwindow_mock.hpp test/settings_mock.hpp
${rekonqwindow_SRCS} ${rekonqwindow_IFACES})
target_compile_definitions(test_rekonqwindow PRIVATE REKONQ_TEST)
target_link_libraries(test_rekonqwindow GTest::gtest GTest::gmock bookmarks settings)
gtest_discover_tests(test_rekonqwindow)
endif()
### ------------ INSTALL FILES...
#INSTALL( TARGETS rekonq ${INSTALL_TARGETS_DEFAULT_ARGS} )
#INSTALL( TARGETS kdeinit_rekonq ${INSTALL_TARGETS_DEFAULT_ARGS} )
# kwebapp script install (provided for retro-compatibility...)
#FILE( COPY data/kwebapp DESTINATION ${BIN_INSTALL_DIR}
# FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE )
#INSTALL( FILES rekonq.kcfg DESTINATION ${KCFG_INSTALL_DIR} )
#INSTALL( FILES webwindow/rekonqui.rc DESTINATION ${DATA_INSTALL_DIR}/rekonq )
|