Merge lp:~albaguirre/unity-mir/cross-compile-link-fix into lp:unity-mir

Proposed by Alberto Aguirre
Status: Merged
Approved by: Alberto Aguirre
Approved revision: 181
Merged at revision: 185
Proposed branch: lp:~albaguirre/unity-mir/cross-compile-link-fix
Merge into: lp:unity-mir
Diff against target: 52 lines (+8/-12)
3 files modified
src/modules/Unity/Application/CMakeLists.txt (+4/-6)
src/unity-mir/CMakeLists.txt (+2/-4)
tests/auto/modules/Unity/Application/CMakeLists.txt (+2/-2)
To merge this branch: bzr merge lp:~albaguirre/unity-mir/cross-compile-link-fix
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Gerry Boland (community) Approve
Review via email: mp+205690@code.launchpad.net

Commit message

[cmake] Use XXX_LDFLAGS for libraries found with pkg_check_modules.

Using the pkg given LDFLAGS resolves linking issues when cross-compiling

Description of the change

[cmake] Use XXX_LDFLAGS for libraries found with pkg_check_modules.

Using the pkg given LDFLAGS resolves linking issues when cross-compiling as the libraries will not be in /usr/lib/...
but rather in some ${PREFIX}/usr/lib/...

pkg-config returns the correct path in to cmake in XXX_LDFLAGS, but the target cmake recipe linking the libraries has to use them.

To post a comment you must log in.
Revision history for this message
Gerry Boland (gerboland) wrote :

Is there any point in having the *_LIBRARIES variables at all?

review: Needs Information
Revision history for this message
Gerry Boland (gerboland) wrote :

Seems there is, approving

review: Approve
Revision history for this message
Gerry Boland (gerboland) wrote :

Yeah that makes sense now.

review: Approve
Revision history for this message
Alberto Aguirre (albaguirre) wrote :

> Is there any point in having the *_LIBRARIES variables at all?

Nope no reason.

Revision history for this message
Gerry Boland (gerboland) wrote :

@Alberto: please add in the description the review checklist questions & your answers from https://wiki.ubuntu.com/Process/Merges/Checklists/Unity-Mir

Here's my corresponding review checklist:

• Did you perform an exploratory manual test run of the code change and any related functionality?
Just build script fixes, no code change. Resulting package works

• Did CI run pass? If not, please explain why.
It did

Revision history for this message
Alberto Aguirre (albaguirre) wrote :

Did you perform an exploratory manual test run of the code change and any related functionality?
Tested that code still compiled correctly and ran with unity8.

 * Did CI run pass? If not, please explain why.
The Jenkins bot in the reviewer section seems stuck so I don't know if CI run passed.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Alberto Aguirre (albaguirre) wrote :

Did you perform an exploratory manual test run of the code change and any related functionality?
Tested that code still compiled correctly and ran with unity8.

 * Did CI run pass? If not, please explain why.
Yes

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/modules/Unity/Application/CMakeLists.txt'
2--- src/modules/Unity/Application/CMakeLists.txt 2014-01-27 11:29:44 +0000
3+++ src/modules/Unity/Application/CMakeLists.txt 2014-02-21 21:45:23 +0000
4@@ -74,12 +74,10 @@
5 ${CMAKE_THREAD_LIBS_INIT}
6
7 ${GLIB_LDFLAGS}
8- ${UBUNTU_PLATFORM_API_LIBRARIES}
9- ${MIRCOMMON_LIBRARIES}
10- ${MIRSERVER_LIBRARIES}
11- ${PROCESS_CPP_LIBRARIES}
12- ${UBUNTU_PLATFORM_API_LIBRARIES}
13- ${UPSTART_APP_LAUNCH_LIBRARIES}
14+ ${UBUNTU_PLATFORM_API_LDFLAGS}
15+ ${MIRSERVER_LDFLAGS}
16+ ${PROCESS_CPP_LDFLAGS}
17+ ${UPSTART_APP_LAUNCH_LDFLAGS}
18
19 ubuntu_application_api_mirserver
20 )
21
22=== modified file 'src/unity-mir/CMakeLists.txt'
23--- src/unity-mir/CMakeLists.txt 2014-02-07 16:10:12 +0000
24+++ src/unity-mir/CMakeLists.txt 2014-02-21 21:45:23 +0000
25@@ -73,10 +73,8 @@
26 Qt5::DBus
27
28 ${CMAKE_THREAD_LIBS_INIT}
29-
30- ${UBUNTU_PLATFORM_API_LIBRARIES}
31- ${MIRCOMMON_LIBRARIES}
32- ${MIRSERVER_LIBRARIES}
33+ ${UBUNTU_PLATFORM_API_LDFLAGS}
34+ ${MIRSERVER_LDFLAGS}
35 ${PROTOBUF_LIBRARIES}
36
37 boost_system
38
39=== modified file 'tests/auto/modules/Unity/Application/CMakeLists.txt'
40--- tests/auto/modules/Unity/Application/CMakeLists.txt 2014-01-27 11:29:44 +0000
41+++ tests/auto/modules/Unity/Application/CMakeLists.txt 2014-02-21 21:45:23 +0000
42@@ -19,8 +19,8 @@
43 unity-mir
44 unityapplicationplugin
45
46- ${MIRSERVER_LIBRARIES}
47- ${UPSTART_APP_LAUNCH_LIBRARIES})
48+ ${MIRSERVER_LDFLAGS}
49+ ${UPSTART_APP_LAUNCH_LDFLAGS})
50
51 install(
52 TARGETS unity-mir-test-app

Subscribers

People subscribed via source and target branches