Merge lp:~saviq/dee-qt/rename-libs into lp:~unity-team/dee-qt/qt4-and-qt5
- rename-libs
- Merge into qt4-and-qt5
Status: | Merged |
---|---|
Merged at revision: | 82 |
Proposed branch: | lp:~saviq/dee-qt/rename-libs |
Merge into: | lp:~unity-team/dee-qt/qt4-and-qt5 |
Diff against target: |
684 lines (+199/-235) 22 files modified
.bzrignore (+2/-2) CMakeLists.txt (+34/-98) debian/changelog (+13/-0) debian/control (+46/-20) debian/libdee-qt-3.install (+1/-3) debian/libdee-qt-dev.install (+3/-3) debian/libdee-qt5-3.install (+1/-3) debian/libdee-qt5-dev.install (+3/-3) debian/qml1-dee-3.install (+2/-0) debian/qml2-dee-3.install (+2/-0) debian/rules (+3/-3) libdee-qt.pc.in (+6/-6) modules/CMakeLists.txt (+1/-0) modules/Dee/CMakeLists.txt (+45/-0) modules/Dee/plugin.cpp (+3/-3) modules/Dee/plugin.h (+1/-1) modules/Dee/qmldir (+2/-1) test.cpp (+0/-35) test.h (+0/-52) tests/CMakeLists.txt (+29/-0) tests/test_qtquick1.qml (+1/-1) tests/test_qtquick2.qml (+1/-1) |
To merge this branch: | bzr merge lp:~saviq/dee-qt/rename-libs |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Didier Roche-Tolomelli | Approve | ||
Albert Astals Cid (community) | Approve | ||
Cris Dywan | Pending | ||
Review via email: mp+137177@code.launchpad.net |
Commit message
rename libqtdee to libdee-qt, refactor plugin and tests
* rename the source package to dee-qt
* rename libqtdee to libdee-qt
* rename libqtdee-qt5 to libdee-qt5
* bump version to 3.0.0
* separate plugin out into "modules" directory
* separate tests out
* drop obsolete test.cpp
Description of the change
To converge on a single way to name libraries and friends, rename them from libqtdee to libdee-qt.
Refactor the plugin and tests.
- 82. By Michał Sawicz
-
rename libqtdee to libdee-qt [code and CMake], refactor plugin and tests
* rename the source package to dee-qt
* rename libqtdee to libdee-qt
* rename libqtdee-qt5 to libdee-qt5
* bump version to 3.0.0
* separate plugin out into "modules" directory
* separate tests out
* drop obsolete test.cpp
* rename dee 0.1 QML plugin to Dee 3.0 - 83. By Michał Sawicz
-
rename libqtdee to libdee-qt [packaging]
- 84. By Michał Sawicz
-
bump version in .pc
- 85. By Michał Sawicz
-
rename cmake project to dee-qt
- 86. By Michał Sawicz
-
fix .pc include dir
- 87. By Michał Sawicz
-
tweak CMakeLists.txts
Albert Astals Cid (aacid) wrote : | # |
The splitting and cmake stuff works fine and looks correct, I'll let Didier comment on the debian packaging stuff
- 88. By Michał Sawicz
-
add missing dev depends
Cris Dywan (kalikiana) wrote : | # |
We should query qmake for the import path.
+ # FIXME: find a way to deterime that
+ set(IMPORT_
execute_
- 89. By Michał Sawicz
-
use QT_IMPORTS_DIR to determine imports install path
Cris Dywan (kalikiana) wrote : | # |
Nice work on QT_IMPORTS_DIR. I did a test run and it works well.
Didier Roche-Tolomelli (didrocks) wrote : | # |
Hey! Nice work, mostly good, but still some fix needed :)
So, to handle the transition from a previous release, we need to tell apt that the new package name replaces the old packages.
For that, you need to Provides/
You can see: http://
The other thing is that we decided with zoltan to separate the QML in its own package, which will be called qtquick2.
And that the qml files and path will contains those as well. If you need more info, please ping me on IRC :)
The rest is looking good to me, nice work! :)
- 90. By Michał Sawicz
-
enable multiarch, split plugin into a separate package
- 91. By Michał Sawicz
-
add a module directive in qmldir
Didier Roche-Tolomelli (didrocks) wrote : | # |
I don't find qtbase and qtdeclarative on raring? what are those build-deps?
Also, I won't say that qtquick1.0-dee-3 provides libqtdee2, I'll just keep the conflicts/replaces here.
The rest seems quite ok to me, but I would love to see the debs or have an easy way to build it to look at them :)
Didier Roche-Tolomelli (didrocks) wrote : | # |
Simple QtQuick2 plugin for Dee (https:/
ah, also please change that in the description (we tend to not write url)
Michał Sawicz (saviq) wrote : | # |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
W dniu 06.12.2012 13:20, Didier Roche pisze:
> Review: Needs Information
>
> I don't find qtbase and qtdeclarative on raring? what are those
> build-deps?
I'm using ppa:canonical-
building against that. We don't yet have qt5 in raring, although
ppa:canonical-
to the distro in the end. I can "rebase" on that, if needed.
> Also, I won't say that qtquick1.0-dee-3 provides libqtdee2, I'll
> just keep the conflicts/replaces here.
Should anything else provide libqtdee2? libdee-qt-3? Problem is that
qtquick1.0-dee-3 provides the QtQuick plugin that we had before
> The rest seems quite ok to me, but I would love to see the debs or
> have an easy way to build it to look at them :)
I've uploaded them to http://
and will put them in a PPA in a sec.
- --
Michał Sawicz <email address hidden>
Canonical Services Ltd.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with undefined - http://
iQIcBAEBAgAGBQJ
hxogjzN2xUE8of8
Fhr3jVhnD61SwQw
RBmzl5RXEKImFLW
vjnMlhLq/
fpSkzn0MZUhTOlK
VVadG6/
Bi1tnRAb7HowZ1G
bw0OZA2fubFmAk1
atAbPuXGNVjod05
YqyWnWOJnnR8MJB
v81eDecksOefG5U
=GtwX
-----END PGP SIGNATURE-----
- 92. By Michał Sawicz
-
add <soname> to library name
- 93. By Michał Sawicz
-
apply tweaks requested by Didier
Didier Roche-Tolomelli (didrocks) wrote : | # |
everything is looking good to me packaging-wise. I think we'll revisit later for a double check once we'll be able to land that to ubuntu for sanity :)
- 94. By Michał Sawicz
-
use qml${version}
-${project} -${version} naming scheme - 95. By Michał Sawicz
-
break/replace previous qtquick{
1,2}.0- dee-3 packages, enable testing
Preview Diff
1 | === modified file '.bzrignore' |
2 | --- .bzrignore 2010-11-22 08:03:37 +0000 |
3 | +++ .bzrignore 2013-01-31 15:15:25 +0000 |
4 | @@ -2,7 +2,7 @@ |
5 | CMakeFiles |
6 | Makefile |
7 | cmake_install.cmake |
8 | -libQtDee.so* |
9 | +libdee-qt.so* |
10 | +libdee-qt5.so* |
11 | moc_*.cxx |
12 | -test |
13 | install_manifest.txt |
14 | |
15 | === modified file 'CMakeLists.txt' |
16 | --- CMakeLists.txt 2012-11-27 18:40:27 +0000 |
17 | +++ CMakeLists.txt 2013-01-31 15:15:25 +0000 |
18 | @@ -1,6 +1,10 @@ |
19 | -project(libqtdee) |
20 | +project(dee-qt) |
21 | cmake_minimum_required(VERSION 2.8.6) |
22 | |
23 | +set(SONAME 3) |
24 | +set(VERSION 3.0) |
25 | +set(SOVERSION 3.0.0) |
26 | + |
27 | # Instruct CMake to run moc automatically when needed. |
28 | set(CMAKE_AUTOMOC ON) |
29 | |
30 | @@ -10,22 +14,15 @@ |
31 | message("Building Qt5 version") |
32 | |
33 | find_package(Qt5Core REQUIRED) |
34 | - find_package(Qt5Quick REQUIRED) |
35 | - find_package(Qt5Test REQUIRED) |
36 | find_package(Qt5DBus REQUIRED) |
37 | |
38 | add_definitions(-DWITHQT5=1) |
39 | |
40 | - set(QTDEE_LIBNAME QtDee-qt5) |
41 | - set(OUR_QT_INCLUDES ${Qt5Core_INCLUDE_DIRS} ${Qt5Quick_INCLUDE_DIRS} ${Qt5Test_INCLUDE_DIRS} ${Qt5DBus_INCLUDE_DIRS}) |
42 | + set(DEE_QT_LIBNAME dee-qt5-${SONAME}) |
43 | + set(OUR_QT_INCLUDES ${Qt5Core_INCLUDE_DIRS} ${Qt5DBus_INCLUDE_DIRS}) |
44 | set(OUR_QT_CORE_LIB ${Qt5Core_LIBRARIES}) |
45 | - set(OUR_QT_TEST_LIB ${Qt5Test_LIBRARIES}) |
46 | - set(OUR_QT_QUICK_LIB ${Qt5Quick_LIBRARIES}) |
47 | set(OUR_QT_DBUS_LIB ${Qt5DBus_LIBRARIES}) |
48 | - # FIXME: find a way to deterime that |
49 | - set(IMPORT_INSTALL_DIR /opt/qt5/imports/dee) |
50 | - set(QT_PKGCONFIG_DEPENDENCIES "QtCore QtQuick") |
51 | - set(QT_DEE_PKGCONFIG_FILE libqtdee-qt5.pc) |
52 | + set(QT_PKGCONFIG_DEPENDENCIES "QtCore") |
53 | else () |
54 | message("Building Qt4 version") |
55 | |
56 | @@ -33,91 +30,57 @@ |
57 | |
58 | add_definitions(-DWITHQT5=0) |
59 | |
60 | - set(QTDEE_LIBNAME QtDee) |
61 | - set(OUR_QT_INCLUDES ${QT_INCLUDE_DIR} ${QT_QTCORE_INCLUDE_DIR} ${QT_QTDECLARATIVE_INCLUDE_DIR} ${QT_QTTEST_INCLUDE_DIR} ${QT_QTDBUS_INCLUDE_DIR}) |
62 | + set(DEE_QT_LIBNAME dee-qt-${SONAME}) |
63 | + set(OUR_QT_INCLUDES ${QT_INCLUDE_DIR} ${QT_QTCORE_INCLUDE_DIR} ${QT_QTDBUS_INCLUDE_DIR}) |
64 | set(OUR_QT_CORE_LIB ${QT_QTCORE_LIBRARIES}) |
65 | - set(OUR_QT_TEST_LIB ${QT_QTTEST_LIBRARIES}) |
66 | - set(OUR_QT_QUICK_LIB ${QT_QTDECLARATIVE_LIBRARIES}) |
67 | set(OUR_QT_DBUS_LIB ${QT_QTDBUS_LIBRARIES}) |
68 | - set(IMPORT_INSTALL_DIR lib/qt4/imports/dee) |
69 | - set(QT_PKGCONFIG_DEPENDENCIES "QtCore QtDBus QtDeclarative") |
70 | - set(QT_DEE_PKGCONFIG_FILE libqtdee.pc) |
71 | + set(QT_PKGCONFIG_DEPENDENCIES "QtCore QtDBus") |
72 | endif () |
73 | + |
74 | +set(QT_DEE_PKGCONFIG_FILE lib${DEE_QT_LIBNAME}.pc) |
75 | + |
76 | pkg_check_modules(DEE REQUIRED dee-1.0) |
77 | |
78 | # Build flags |
79 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden -Wall -Wundef -std=c++0x") |
80 | |
81 | # Sources |
82 | -## QtDee |
83 | -set(QtDee_SRCS |
84 | +set(DEE_QT_SRCS |
85 | deelistmodel.cpp |
86 | ) |
87 | |
88 | -set(QtDee_MOC_HDRS |
89 | - deelistmodel.h |
90 | - ) |
91 | - |
92 | - |
93 | -## QtDeeQml |
94 | -set(QtDeeQml_SRCS |
95 | - plugin.cpp |
96 | - ) |
97 | - |
98 | -set(QtDeeQml_MOC_HDRS |
99 | - plugin.h |
100 | - ) |
101 | - |
102 | # Build |
103 | add_definitions(-DQT_NO_KEYWORDS) |
104 | |
105 | include_directories( |
106 | + ${CMAKE_CURRENT_SOURCE_DIR} |
107 | ${CMAKE_CURRENT_BINARY_DIR} |
108 | ${OUR_QT_INCLUDES} |
109 | ${DEE_INCLUDE_DIRS} |
110 | ) |
111 | |
112 | -## QtDee |
113 | -add_library(${QTDEE_LIBNAME} SHARED ${QtDee_SRCS} ${QtDee_MOC_SRCS}) |
114 | -target_link_libraries(${QTDEE_LIBNAME} |
115 | +add_library(${DEE_QT_LIBNAME} SHARED ${DEE_QT_SRCS}) |
116 | +target_link_libraries(${DEE_QT_LIBNAME} |
117 | ${OUR_QT_CORE_LIB} |
118 | ${DEE_LDFLAGS} |
119 | ) |
120 | |
121 | -set_target_properties(${QTDEE_LIBNAME} PROPERTIES |
122 | - SOVERSION 2 |
123 | - VERSION 2.0.0 |
124 | - ) |
125 | - |
126 | -## QtDeeQml |
127 | -add_library(QtDeeQml SHARED ${QtDeeQml_SRCS} ${QtDeeQml_MOC_SRCS}) |
128 | - |
129 | -target_link_libraries(QtDeeQml |
130 | - ${QTDEE_LIBNAME} |
131 | - ${OUR_QT_QUICK_LIB} |
132 | - ) |
133 | - |
134 | -## test |
135 | -set(test_SRCS |
136 | - test.cpp |
137 | - ) |
138 | - |
139 | -set(test_MOC_HDRS |
140 | - test.h |
141 | - ) |
142 | - |
143 | -add_executable(test ${test_SRCS} ${test_MOC_SRCS}) |
144 | -set_target_properties(test PROPERTIES COMPILE_FLAGS -fPIC) |
145 | -target_link_libraries(test |
146 | - ${QTDEE_LIBNAME} |
147 | - ) |
148 | +set_target_properties(${DEE_QT_LIBNAME} PROPERTIES |
149 | + SOVERSION ${SONAME} |
150 | + VERSION ${SOVERSION} |
151 | + ) |
152 | + |
153 | +# Unit-Test |
154 | +enable_testing() |
155 | + |
156 | +add_subdirectory(modules) |
157 | +add_subdirectory(tests) |
158 | |
159 | # Install |
160 | -set(INCLUDE_INSTALL_DIR include/QtDee) |
161 | +set(INCLUDE_INSTALL_DIR include/lib${DEE_QT_LIBNAME}) |
162 | |
163 | -## QtDee |
164 | -install(TARGETS ${QTDEE_LIBNAME} |
165 | - LIBRARY DESTINATION lib${LIB_SUFFIX} |
166 | +install(TARGETS ${DEE_QT_LIBNAME} |
167 | + LIBRARY DESTINATION lib/${CMAKE_LIBRARY_ARCHITECTURE}${LIB_SUFFIX} |
168 | ) |
169 | |
170 | install(FILES deelistmodel.h |
171 | @@ -128,36 +91,9 @@ |
172 | set (PREFIX "${CMAKE_INSTALL_PREFIX}") |
173 | set (EXEC_PREFIX "${CMAKE_INSTALL_PREFIX}") |
174 | |
175 | -configure_file (libqtdee.pc.in |
176 | +configure_file (libdee-qt.pc.in |
177 | ${CMAKE_CURRENT_BINARY_DIR}/${QT_DEE_PKGCONFIG_FILE} @ONLY) |
178 | |
179 | install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${QT_DEE_PKGCONFIG_FILE} |
180 | - DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/pkgconfig |
181 | - ) |
182 | - |
183 | -## QtDeeQml |
184 | -install(TARGETS QtDeeQml |
185 | - LIBRARY DESTINATION ${IMPORT_INSTALL_DIR} |
186 | - ) |
187 | - |
188 | -install(FILES qmldir |
189 | - DESTINATION ${IMPORT_INSTALL_DIR} |
190 | - ) |
191 | - |
192 | -## Unit-Test |
193 | -enable_testing() |
194 | -add_executable(conversiontest conversiontest.cpp) |
195 | -target_link_libraries(conversiontest ${OUR_QT_TEST_LIB} ${QTDEE_LIBNAME}) |
196 | -set_target_properties(conversiontest PROPERTIES COMPILE_FLAGS -fPIC) |
197 | -add_test(NAME conversiontest COMMAND "dbus-test-runner" "--task" "${CMAKE_CURRENT_BINARY_DIR}/conversiontest" "-p" "-xunitxml" "-p" "-o" "-p" "conversiontest-xunit.xml") |
198 | -set_property(TEST conversiontest PROPERTY ENVIRONMENT "LD_LIBRARY_PATH=.") |
199 | - |
200 | -add_executable(test-helper test-helper.cpp) |
201 | -target_link_libraries(test-helper ${OUR_QT_CORE_LIB} ${OUR_QT_DBUS_LIB} ${DEE_LDFLAGS}) |
202 | -set_target_properties(test-helper PROPERTIES COMPILE_FLAGS -fPIC) |
203 | - |
204 | -add_executable(deelistmodeltest deelistmodeltest.cpp) |
205 | -target_link_libraries(deelistmodeltest ${OUR_QT_TEST_LIB} ${OUR_QT_DBUS_LIB} ${QTDEE_LIBNAME}) |
206 | -set_target_properties(deelistmodeltest PROPERTIES COMPILE_FLAGS -fPIC) |
207 | -add_test(NAME deelistmodeltest COMMAND "dbus-test-runner" "--task" "${CMAKE_CURRENT_BINARY_DIR}/test-helper" "--task" "${CMAKE_CURRENT_BINARY_DIR}/deelistmodeltest" "-p" "-xunitxml" "-p" "-o" "-p" "deelistmodeltest-xunit.xml") |
208 | -set_property(TEST deelistmodeltest PROPERTY ENVIRONMENT "LD_LIBRARY_PATH=.") |
209 | + DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/${CMAKE_LIBRARY_ARCHITECTURE}/pkgconfig |
210 | + ) |
211 | |
212 | === modified file 'debian/changelog' |
213 | --- debian/changelog 2012-11-27 18:40:27 +0000 |
214 | +++ debian/changelog 2013-01-31 15:15:25 +0000 |
215 | @@ -1,3 +1,16 @@ |
216 | +dee-qt (3.0-0ubuntu1) quantal; urgency=low |
217 | + |
218 | + * new release |
219 | + * rename the source package to dee-qt |
220 | + * rename libqtdee to libdee-qt |
221 | + * rename libqtdee-qt5 to libdee-qt5 |
222 | + * separate plugin out into "modules" directory |
223 | + * separate tests out |
224 | + * drop obsolete test.cpp |
225 | + * rename dee 0.1 QML plugin to Dee 3.0 |
226 | + |
227 | + -- Michał Sawicz <michal.sawicz@canonical.com> Fri, 30 Nov 2012 12:32:41 +0100 |
228 | + |
229 | libqtdee (0.2.4-0ubuntu4) quantal; urgency=low |
230 | |
231 | * debian/rules |
232 | |
233 | === modified file 'debian/control' |
234 | --- debian/control 2012-11-21 15:20:20 +0000 |
235 | +++ debian/control 2013-01-31 15:15:25 +0000 |
236 | @@ -1,4 +1,4 @@ |
237 | -Source: libqtdee |
238 | +Source: dee-qt |
239 | Section: libs |
240 | Priority: optional |
241 | Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> |
242 | @@ -15,41 +15,67 @@ |
243 | # just go ahead. ~unity-team will notice and sync up the code again. |
244 | Vcs-Bzr: http://bazaar.launchpad.net/~unity-2d-team/dee-qt/trunk |
245 | |
246 | -Package: libqtdee2 |
247 | +Package: libdee-qt-3 |
248 | Architecture: any |
249 | Depends: ${shlibs:Depends}, |
250 | ${misc:Depends}, |
251 | libqt4-dbus, |
252 | libqt4-declarative, |
253 | -Description: Qt binding and QML plugin for Dee - shared library |
254 | - Simple Qt binding and QML plugin for Dee (https://launchpad.net/dee). |
255 | - |
256 | -Package: libqtdee-dev |
257 | +Description: Qt4 binding for Dee - shared library |
258 | + Simple Qt4 binding for Dee. |
259 | + |
260 | +Package: qml1-dee-3 |
261 | +Architecture: any |
262 | +Depends: ${shlibs:Depends}, |
263 | + ${misc:Depends}, |
264 | + libdee-qt-3 (= ${binary:Version}), |
265 | +Breaks: qtquick1.0-dee-3 |
266 | +Replaces: libqtdee2, qtquick1.0-dee-3 |
267 | +Conflicts: libqtdee2 |
268 | +Description: QtQuick1 plugin for Dee |
269 | + Simple QtQuick1 plugin for Dee. |
270 | + |
271 | +Package: libdee-qt-dev |
272 | Section: libdevel |
273 | Architecture: any |
274 | Depends: ${misc:Depends}, |
275 | - libqtdee2 (= ${binary:Version}), |
276 | + libdee-qt-3 (= ${binary:Version}), |
277 | libqt4-dev (>= 4.7), |
278 | -Description: Qt binding and QML plugin for Dee - development files |
279 | - Simple Qt binding and QML plugin for Dee (https://launchpad.net/dee). |
280 | + libdee-dev (>= 1.0.0), |
281 | +Provides: libqtdee-dev |
282 | +Replaces: libqtdee-dev |
283 | +Conflicts: libqtdee-dev |
284 | +Description: Qt binding for Dee - development files |
285 | + Simple Qt binding for Dee. |
286 | . |
287 | This package contains the developer headers for the Qt binding for Dee |
288 | |
289 | -Package: libqtdee-qt5 |
290 | -Architecture: any |
291 | -Depends: ${shlibs:Depends}, |
292 | - ${misc:Depends}, |
293 | -Description: Qt5 binding and QtQuick2 plugin for Dee - shared library |
294 | - Simple Qt5 binding and QtQuick2 plugin for Dee (https://launchpad.net/dee). |
295 | - |
296 | -Package: libqtdee-qt5-dev |
297 | +Package: libdee-qt5-3 |
298 | +Architecture: any |
299 | +Depends: ${shlibs:Depends}, |
300 | + ${misc:Depends}, |
301 | +Description: Qt5 binding for Dee - shared library |
302 | + Simple Qt5 binding for Dee. |
303 | + |
304 | +Package: qml2-dee-3 |
305 | +Architecture: any |
306 | +Depends: ${shlibs:Depends}, |
307 | + ${misc:Depends}, |
308 | + libdee-qt5-3 (= ${binary:Version}), |
309 | +Breaks: qtquick2.0-dee-3 |
310 | +Replaces: qtquick2.0-dee-3 |
311 | +Description: QtQuick2 plugin for Dee |
312 | + Simple QtQuick2 plugin for Dee. |
313 | + |
314 | +Package: libdee-qt5-dev |
315 | Section: libdevel |
316 | Architecture: any |
317 | Depends: ${misc:Depends}, |
318 | - libqtdee-qt5 (= ${binary:Version}), |
319 | + libdee-qt5-3 (= ${binary:Version}), |
320 | qtbase, |
321 | qtdeclarative, |
322 | -Description: Qt5 binding and QtQuick2 plugin for Dee - development files |
323 | - Simple Qt5 binding and QtQuick2 plugin for Dee (https://launchpad.net/dee). |
324 | + libdee-dev (>= 1.0.0), |
325 | +Description: Qt5 binding for Dee - development files |
326 | + Simple Qt5 binding for Dee. |
327 | . |
328 | This package contains the developer headers for the Qt binding for Dee |
329 | |
330 | === renamed file 'debian/libqtdee2.install' => 'debian/libdee-qt-3.install' |
331 | --- debian/libqtdee2.install 2011-01-28 05:27:37 +0000 |
332 | +++ debian/libdee-qt-3.install 2013-01-31 15:15:25 +0000 |
333 | @@ -1,3 +1,1 @@ |
334 | -usr/lib/libQtDee.so.* |
335 | -usr/lib/qt4/imports/dee/libQtDeeQml.so |
336 | -usr/lib/qt4/imports/dee/qmldir |
337 | +usr/lib/*/libdee-qt-3.so.* |
338 | |
339 | === renamed file 'debian/libqtdee-dev.install' => 'debian/libdee-qt-dev.install' |
340 | --- debian/libqtdee-dev.install 2012-01-05 20:27:31 +0000 |
341 | +++ debian/libdee-qt-dev.install 2013-01-31 15:15:25 +0000 |
342 | @@ -1,3 +1,3 @@ |
343 | -usr/lib/libQtDee.so |
344 | -usr/include/QtDee/*.h |
345 | -usr/lib/pkgconfig/libqtdee.pc |
346 | +usr/include/libdee-qt-3/*.h |
347 | +usr/lib/*/libdee-qt-3.so |
348 | +usr/lib/*/pkgconfig/libdee-qt-3.pc |
349 | |
350 | === renamed file 'debian/libqtdee-qt5.install' => 'debian/libdee-qt5-3.install' |
351 | --- debian/libqtdee-qt5.install 2012-11-27 18:40:27 +0000 |
352 | +++ debian/libdee-qt5-3.install 2013-01-31 15:15:25 +0000 |
353 | @@ -1,3 +1,1 @@ |
354 | -usr/lib/libQtDee-qt5.so.* |
355 | -opt/qt5/imports/dee/libQtDeeQml.so |
356 | -opt/qt5/imports/dee/qmldir |
357 | +usr/lib/*/libdee-qt5-3.so.* |
358 | |
359 | === renamed file 'debian/libqtdee-qt5-dev.install' => 'debian/libdee-qt5-dev.install' |
360 | --- debian/libqtdee-qt5-dev.install 2012-11-27 18:40:27 +0000 |
361 | +++ debian/libdee-qt5-dev.install 2013-01-31 15:15:25 +0000 |
362 | @@ -1,3 +1,3 @@ |
363 | -usr/lib/libQtDee-qt5.so |
364 | -usr/include/QtDee/*.h |
365 | -usr/lib/pkgconfig/libqtdee-qt5.pc |
366 | +usr/include/libdee-qt5-3/*.h |
367 | +usr/lib/*/libdee-qt5-3.so |
368 | +usr/lib/*/pkgconfig/libdee-qt5-3.pc |
369 | |
370 | === added file 'debian/qml1-dee-3.install' |
371 | --- debian/qml1-dee-3.install 1970-01-01 00:00:00 +0000 |
372 | +++ debian/qml1-dee-3.install 2013-01-31 15:15:25 +0000 |
373 | @@ -0,0 +1,2 @@ |
374 | +usr/lib/*/qt4/imports/Dee.3/libDeePlugin.so |
375 | +usr/lib/*/qt4/imports/Dee.3/qmldir |
376 | |
377 | === added file 'debian/qml2-dee-3.install' |
378 | --- debian/qml2-dee-3.install 1970-01-01 00:00:00 +0000 |
379 | +++ debian/qml2-dee-3.install 2013-01-31 15:15:25 +0000 |
380 | @@ -0,0 +1,2 @@ |
381 | +opt/qt5/imports/Dee.3/libDeePlugin.so |
382 | +opt/qt5/imports/Dee.3/qmldir |
383 | |
384 | === modified file 'debian/rules' |
385 | --- debian/rules 2012-11-27 18:40:27 +0000 |
386 | +++ debian/rules 2013-01-31 15:15:25 +0000 |
387 | @@ -12,9 +12,7 @@ |
388 | override_dh_auto_configure: |
389 | dh_auto_configure -Bbuild/qt4 -- -DWITHQT5=0 |
390 | PATH=/opt/qt5/bin:$(PATH) \ |
391 | - dh_auto_configure -Bbuild/qt5 -- -DCMAKE_MODULE_PATH=/opt/qt5/lib/cmake \ |
392 | - -DLD_LIBRARY_PATH=/opt/qt5/lib:$(LD_LIBRARY_PATH) \ |
393 | - -DWITHQT5=1 |
394 | + dh_auto_configure -Bbuild/qt5 -- -DWITHQT5=1 |
395 | |
396 | override_dh_auto_build: |
397 | dh_auto_build -Bbuild/qt4 |
398 | @@ -25,6 +23,8 @@ |
399 | dh_auto_clean -Bbuild/qt5 |
400 | |
401 | override_dh_auto_test: |
402 | + dh_auto_test -Bbuild/qt4 |
403 | + dh_auto_test -Bbuild/qt5 |
404 | |
405 | override_dh_auto_install: |
406 | dh_auto_install -Bbuild/qt4 |
407 | |
408 | === renamed file 'libqtdee.pc.in' => 'libdee-qt.pc.in' |
409 | --- libqtdee.pc.in 2012-11-12 12:48:13 +0000 |
410 | +++ libdee-qt.pc.in 2013-01-31 15:15:25 +0000 |
411 | @@ -1,12 +1,12 @@ |
412 | prefix=@PREFIX@ |
413 | exec_prefix=@EXEC_PREFIX@ |
414 | -libdir=${exec_prefix}/lib |
415 | -includedir=${prefix}/include |
416 | +libdir=${exec_prefix}/lib/@CMAKE_LIBRARY_ARCHITECTURE@ |
417 | +includedir=${prefix}/@INCLUDE_INSTALL_DIR@ |
418 | |
419 | -Name: libqtdee |
420 | +Name: @DEE_QT_LIBNAME@ |
421 | Description: Qt binding and QML plugin for Dee. |
422 | -Version: 0.2 |
423 | +Version: @VERSION@ |
424 | |
425 | Requires: @QT_PKGCONFIG_DEPENDENCIES@ dee-1.0 |
426 | -Libs: -L${libdir} -l@QTDEE_LIBNAME@ |
427 | -Cflags: -I${includedir}/QtDee |
428 | +Libs: -L${libdir} -l@DEE_QT_LIBNAME@ |
429 | +Cflags: -I${includedir} |
430 | |
431 | === added directory 'modules' |
432 | === added file 'modules/CMakeLists.txt' |
433 | --- modules/CMakeLists.txt 1970-01-01 00:00:00 +0000 |
434 | +++ modules/CMakeLists.txt 2013-01-31 15:15:25 +0000 |
435 | @@ -0,0 +1,1 @@ |
436 | +add_subdirectory(Dee) |
437 | |
438 | === added directory 'modules/Dee' |
439 | === added file 'modules/Dee/CMakeLists.txt' |
440 | --- modules/Dee/CMakeLists.txt 1970-01-01 00:00:00 +0000 |
441 | +++ modules/Dee/CMakeLists.txt 2013-01-31 15:15:25 +0000 |
442 | @@ -0,0 +1,45 @@ |
443 | + |
444 | +if (WITHQT5) |
445 | + find_package(Qt5Quick REQUIRED) |
446 | + set(OUR_QT_QUICK_LIB ${Qt5Quick_LIBRARIES}) |
447 | + |
448 | + get_target_property(QMAKE_EXECUTABLE Qt5::qmake LOCATION) |
449 | + exec_program(${QMAKE_EXECUTABLE} ARGS "-query QT_INSTALL_IMPORTS" OUTPUT_VARIABLE QT_IMPORTS_DIR) |
450 | + file(TO_CMAKE_PATH "${QT_IMPORTS_DIR}" QT_IMPORTS_DIR) |
451 | + |
452 | + set(OUR_QT_QUICK_INCLUDE ${Qt5Quick_INCLUDE_DIRS}) |
453 | + LIST(APPEND QT_PKGCONFIG_DEPENDENCIES "QtQuick") |
454 | +else () |
455 | + set(OUR_QT_QUICK_LIB ${QT_QTDECLARATIVE_LIBRARIES}) |
456 | + set(OUR_QT_QUICK_INCLUDE ${QT_QTDECLARATIVE_INCLUDE_DIR}) |
457 | + LIST(APPEND QT_PKGCONFIG_DEPENDENCIES "QtDeclarative") |
458 | +endif () |
459 | + |
460 | +set(DeePlugin_SRCS |
461 | + plugin.cpp |
462 | + ) |
463 | + |
464 | +add_library(DeePlugin SHARED ${DeePlugin_SRCS}) |
465 | + |
466 | +target_link_libraries(DeePlugin |
467 | + ${DEE_QT_LIBNAME} |
468 | + ${OUR_QT_QUICK_LIB} |
469 | + ) |
470 | + |
471 | +include_directories( |
472 | + ${CMAKE_CURRENT_BINARY_DIR} |
473 | + ${OUR_QT_QUICK_INCLUDE} |
474 | + ) |
475 | + |
476 | +# copy qmldir file into build directory for shadow builds |
477 | +file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/qmldir" |
478 | + DESTINATION ${CMAKE_CURRENT_BINARY_DIR} |
479 | + ) |
480 | + |
481 | +install(TARGETS DeePlugin |
482 | + LIBRARY DESTINATION ${QT_IMPORTS_DIR}/Dee.${SONAME} |
483 | + ) |
484 | + |
485 | +install(FILES qmldir |
486 | + DESTINATION ${QT_IMPORTS_DIR}/Dee.${SONAME} |
487 | + ) |
488 | |
489 | === renamed file 'plugin.cpp' => 'modules/Dee/plugin.cpp' |
490 | --- plugin.cpp 2012-11-12 12:48:13 +0000 |
491 | +++ modules/Dee/plugin.cpp 2013-01-31 15:15:25 +0000 |
492 | @@ -25,11 +25,11 @@ |
493 | #include <QtDeclarative/qdeclarative.h> |
494 | #endif |
495 | |
496 | -void QtDeePlugin::registerTypes(const char *uri) |
497 | +void DeePlugin::registerTypes(const char *uri) |
498 | { |
499 | - qmlRegisterType<DeeListModel>(uri, 0, 1, "DeeListModel"); |
500 | + qmlRegisterType<DeeListModel>(uri, 3, 0, "DeeListModel"); |
501 | } |
502 | |
503 | #if !WITHQT5 |
504 | - Q_EXPORT_PLUGIN2(QtDee, QtDeePlugin); |
505 | + Q_EXPORT_PLUGIN2(Dee, DeePlugin); |
506 | #endif |
507 | |
508 | === renamed file 'plugin.h' => 'modules/Dee/plugin.h' |
509 | --- plugin.h 2012-11-12 12:48:13 +0000 |
510 | +++ modules/Dee/plugin.h 2013-01-31 15:15:25 +0000 |
511 | @@ -26,7 +26,7 @@ |
512 | #include <QtDeclarative/QDeclarativeExtensionPlugin> |
513 | #endif |
514 | |
515 | -class QtDeePlugin : |
516 | +class DeePlugin : |
517 | #if WITHQT5 |
518 | public QQmlExtensionPlugin |
519 | #else |
520 | |
521 | === renamed file 'qmldir' => 'modules/Dee/qmldir' |
522 | --- qmldir 2011-01-13 16:05:58 +0000 |
523 | +++ modules/Dee/qmldir 2013-01-31 15:15:25 +0000 |
524 | @@ -1,1 +1,2 @@ |
525 | -plugin QtDeeQml |
526 | +module Dee |
527 | +plugin DeePlugin |
528 | |
529 | === removed file 'test.cpp' |
530 | --- test.cpp 2011-01-24 04:05:02 +0000 |
531 | +++ test.cpp 1970-01-01 00:00:00 +0000 |
532 | @@ -1,35 +0,0 @@ |
533 | -/* |
534 | - * Copyright (C) 2010 Canonical, Ltd. |
535 | - * |
536 | - * Authors: |
537 | - * Florian Boucault <florian.boucault@canonical.com> |
538 | - * |
539 | - * This program is free software; you can redistribute it and/or modify |
540 | - * it under the terms of the GNU General Public License as published by |
541 | - * the Free Software Foundation; version 3. |
542 | - * |
543 | - * This program is distributed in the hope that it will be useful, |
544 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
545 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
546 | - * GNU General Public License for more details. |
547 | - * |
548 | - * You should have received a copy of the GNU General Public License |
549 | - * along with this program. If not, see <http://www.gnu.org/licenses/>. |
550 | - */ |
551 | - |
552 | -#include "test.h" |
553 | -#include "deelistmodel.h" |
554 | - |
555 | -int main(int argc, char *argv[]) |
556 | -{ |
557 | - TestApplication application(argc, argv); |
558 | - |
559 | - DeeListModel* model = new DeeListModel; |
560 | - |
561 | - QObject::connect(model, SIGNAL(synchronizedChanged(bool)), &application, SLOT(onSynchronizedChanged(bool))); |
562 | - QObject::connect(model, SIGNAL(rowsInserted(QModelIndex, int, int)), &application, SLOT(onRowsInserted())); |
563 | - |
564 | - model->setName("com.canonical.Unity.ApplicationsPlace.ResultsModel"); |
565 | - |
566 | - return application.exec(); |
567 | -} |
568 | |
569 | === removed file 'test.h' |
570 | --- test.h 2012-01-04 23:52:05 +0000 |
571 | +++ test.h 1970-01-01 00:00:00 +0000 |
572 | @@ -1,52 +0,0 @@ |
573 | -/* |
574 | - * Copyright (C) 2011 Canonical, Ltd. |
575 | - * |
576 | - * Authors: |
577 | - * Florian Boucault <florian.boucault@canonical.com> |
578 | - * |
579 | - * This program is free software; you can redistribute it and/or modify |
580 | - * it under the terms of the GNU General Public License as published by |
581 | - * the Free Software Foundation; version 3. |
582 | - * |
583 | - * This program is distributed in the hope that it will be useful, |
584 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
585 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
586 | - * GNU General Public License for more details. |
587 | - * |
588 | - * You should have received a copy of the GNU General Public License |
589 | - * along with this program. If not, see <http://www.gnu.org/licenses/>. |
590 | - */ |
591 | - |
592 | -#ifndef TEST_H |
593 | -#define TEST_H |
594 | - |
595 | -#include <QtCore/QCoreApplication> |
596 | -#include <QtCore/QDebug> |
597 | - |
598 | -#include "deelistmodel.h" |
599 | - |
600 | -class TestApplication : public QCoreApplication |
601 | -{ |
602 | - Q_OBJECT |
603 | - |
604 | -public: |
605 | - TestApplication(int& argc, char** argv) : QCoreApplication(argc, argv) {} |
606 | - |
607 | -public Q_SLOTS: |
608 | - void onSynchronizedChanged(bool synchronized) { |
609 | - DeeListModel* model = (DeeListModel*)sender(); |
610 | - qDebug() << "Number of columns:" << model->roleNames().size(); |
611 | - qDebug() << "Number of rows:" << model->rowCount(); |
612 | - |
613 | - for(int i = 0; i < model->rowCount(); ++i) { |
614 | - qDebug() << model->data(model->index(i)); |
615 | - } |
616 | - } |
617 | - |
618 | - void onRowsInserted() { |
619 | - DeeListModel* model = (DeeListModel*)sender(); |
620 | - qDebug() << "Rows added, current number:" << model->rowCount(); |
621 | - } |
622 | -}; |
623 | - |
624 | -#endif // TEST_H |
625 | |
626 | === added directory 'tests' |
627 | === added file 'tests/CMakeLists.txt' |
628 | --- tests/CMakeLists.txt 1970-01-01 00:00:00 +0000 |
629 | +++ tests/CMakeLists.txt 2013-01-31 15:15:25 +0000 |
630 | @@ -0,0 +1,29 @@ |
631 | +if (WITHQT5) |
632 | + find_package(Qt5Test REQUIRED) |
633 | + set(OUR_QT_TEST_LIB ${Qt5Test_LIBRARIES}) |
634 | + set(OUR_QT_TEST_INCLUDES ${Qt5Test_INCLUDE_DIRS}) |
635 | +else () |
636 | + set(OUR_QT_TEST_LIB ${QT_QTTEST_LIBRARIES}) |
637 | + set(OUR_QT_TEST_INCLUDES ${QT_QTTEST_INCLUDE_DIR}) |
638 | +endif () |
639 | + |
640 | +include_directories( |
641 | + ${CMAKE_CURRENT_BINARY_DIR} |
642 | + ${OUR_QT_TEST_INCLUDES} |
643 | + ) |
644 | + |
645 | +add_executable(conversiontest conversiontest.cpp) |
646 | +target_link_libraries(conversiontest ${OUR_QT_TEST_LIB} ${DEE_QT_LIBNAME}) |
647 | +set_target_properties(conversiontest PROPERTIES COMPILE_FLAGS -fPIC) |
648 | +add_test(NAME conversiontest COMMAND "dbus-test-runner" "--task" "${CMAKE_CURRENT_BINARY_DIR}/conversiontest" "-p" "-xunitxml" "-p" "-o" "-p" "conversiontest-xunit.xml") |
649 | +set_property(TEST conversiontest PROPERTY ENVIRONMENT "LD_LIBRARY_PATH=.") |
650 | + |
651 | +add_executable(test-helper test-helper.cpp) |
652 | +target_link_libraries(test-helper ${OUR_QT_CORE_LIB} ${OUR_QT_DBUS_LIB} ${DEE_LDFLAGS}) |
653 | +set_target_properties(test-helper PROPERTIES COMPILE_FLAGS -fPIC) |
654 | + |
655 | +add_executable(deelistmodeltest deelistmodeltest.cpp) |
656 | +target_link_libraries(deelistmodeltest ${OUR_QT_TEST_LIB} ${OUR_QT_DBUS_LIB} ${DEE_QT_LIBNAME}) |
657 | +set_target_properties(deelistmodeltest PROPERTIES COMPILE_FLAGS -fPIC) |
658 | +add_test(NAME deelistmodeltest COMMAND "dbus-test-runner" "--task" "${CMAKE_CURRENT_BINARY_DIR}/test-helper" "--task" "${CMAKE_CURRENT_BINARY_DIR}/deelistmodeltest" "-p" "-xunitxml" "-p" "-o" "-p" "deelistmodeltest-xunit.xml") |
659 | +set_property(TEST deelistmodeltest PROPERTY ENVIRONMENT "LD_LIBRARY_PATH=.") |
660 | |
661 | === renamed file 'conversiontest.cpp' => 'tests/conversiontest.cpp' |
662 | === renamed file 'deelistmodeltest.cpp' => 'tests/deelistmodeltest.cpp' |
663 | === renamed file 'test-helper.cpp' => 'tests/test-helper.cpp' |
664 | === renamed file 'test_qtquick1.qml' => 'tests/test_qtquick1.qml' |
665 | --- test_qtquick1.qml 2012-11-12 12:48:13 +0000 |
666 | +++ tests/test_qtquick1.qml 2013-01-31 15:15:25 +0000 |
667 | @@ -1,5 +1,5 @@ |
668 | import QtQuick 1.0 |
669 | -import dee 0.1 |
670 | +import Dee 3.0 |
671 | |
672 | ListView { |
673 | width: 200 |
674 | |
675 | === renamed file 'test_qtquick2.qml' => 'tests/test_qtquick2.qml' |
676 | --- test_qtquick2.qml 2012-11-12 12:48:13 +0000 |
677 | +++ tests/test_qtquick2.qml 2013-01-31 15:15:25 +0000 |
678 | @@ -1,5 +1,5 @@ |
679 | import QtQuick 2.0 |
680 | -import dee 0.1 |
681 | +import Dee 3.0 |
682 | |
683 | ListView { |
684 | width: 200 |
You still have OUR_QT_TEST_LIB in the root CMakeLists.txt and seems we don't need it there since the uses where moved to tests/CMakeList s.txt, same for the use of the test includes inside OUR_QT_INCLUDES
You don't need the enable_testing in tests/CMakeList s.txt, the one in the root CMakeLists.txt is enough
Also I think that you don't need to concatenate OUR_QT_INCLUDES like you do in tests/CMakeList s.txt, you can just use a new variable and use it in include_ directories, as far as i read the include_directories entry in the cmake man page the include_directories commands work like a stack so if the "old" OUR_QT_INCLUDES were already included in the root you'll already have them, just need to include the new stuff