Merge lp:~faure/libdbusmenu-qt/fix_qt5_build into lp:libdbusmenu-qt

Proposed by David Faure
Status: Merged
Approved by: Albert Astals Cid
Approved revision: 239
Merged at revision: 239
Proposed branch: lp:~faure/libdbusmenu-qt/fix_qt5_build
Merge into: lp:libdbusmenu-qt
Diff against target: 51 lines (+9/-6)
2 files modified
CMakeLists.txt (+8/-5)
src/CMakeLists.txt (+1/-1)
To merge this branch: bzr merge lp:~faure/libdbusmenu-qt/fix_qt5_build
Reviewer Review Type Date Requested Status
Albert Astals Cid (community) Approve
Review via email: mp+145274@code.launchpad.net

Description of the change

Qt5 build: Port to ECM 0.0.4, and use GNUInstallDirs to autodetect "lib64".

To post a comment you must log in.
Revision history for this message
Albert Astals Cid (aacid) wrote :

I think the ECM dependency is a bit weird given that there hasn't been a release but the dependency is not new, so hardly anything I can push agaist.

Besides that It makes sense.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'CMakeLists.txt'
2--- CMakeLists.txt 2012-05-21 20:16:56 +0000
3+++ CMakeLists.txt 2013-01-28 23:23:22 +0000
4@@ -48,26 +48,29 @@
5 if (Qt5Widgets_FOUND)
6 find_package(Qt5DBus REQUIRED)
7 include_directories(${Qt5Widgets_INCLUDE_DIRS} ${Qt5DBus_INCLUDE_DIRS})
8- find_package(extra-cmake-modules 0.0.2 REQUIRED)
9- set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${EXTRA_CMAKE_MODULES_MODULE_PATH})
10+ find_package(ECM 0.0.4 REQUIRED)
11+ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH})
12 find_package(Qt5Transitional REQUIRED Core)
13 set(CMAKE_AUTOMOC ON)
14 set(CMAKE_AUTOMOC_RELAXED_MODE ON)
15+ include(GNUInstallDirs)
16+ set(LIB_DESTINATION "${CMAKE_INSTALL_LIBDIR}")
17 else()
18-find_package(Qt4 REQUIRED)
19-include_directories(
20+ find_package(Qt4 REQUIRED)
21+ include_directories(
22 ${QT_INCLUDE_DIR}
23 ${QT_QTCORE_INCLUDE_DIR}
24 ${QT_QTDBUS_INCLUDE_DIR}
25 ${QT_QTGUI_INCLUDE_DIR}
26 )
27+ set(LIB_DESTINATION "lib${LIB_SUFFIX}" CACHE STRING "Library directory name" FORCE)
28 endif()
29
30
31 configure_file(dbusmenu-qt.pc.in ${CMAKE_BINARY_DIR}/dbusmenu-qt.pc @ONLY)
32
33 install(FILES ${CMAKE_BINARY_DIR}/dbusmenu-qt.pc
34- DESTINATION lib${LIB_SUFFIX}/pkgconfig
35+ DESTINATION ${LIB_DESTINATION}/pkgconfig
36 )
37
38 add_subdirectory(src)
39
40=== modified file 'src/CMakeLists.txt'
41--- src/CMakeLists.txt 2012-05-21 20:16:56 +0000
42+++ src/CMakeLists.txt 2013-01-28 23:23:22 +0000
43@@ -75,7 +75,7 @@
44 )
45
46 install(TARGETS dbusmenu-qt
47- LIBRARY DESTINATION lib${LIB_SUFFIX}
48+ LIBRARY DESTINATION ${LIB_DESTINATION}
49 RUNTIME DESTINATION bin)
50
51 install(DIRECTORY .

Subscribers

People subscribed via source and target branches

to all changes: