1 From: Jakub Adam <jakub.adam@ktknet.cz>
2 Date: Thu, 5 Jan 2012 00:57:49 +0100
3 Subject: probe-lib-location
5 Install gammaray_probe.so and libgammaray_widget_export_actions.so
6 to /usr/lib/gammaray as it is application private library.
7 Fixes lintian warnings/errors:
9 package-name-doesnt-match-sonames
10 shlib-without-versioned-soname
11 postinst-must-call-ldconfig
13 CMakeLists.txt | 5 +++--
14 config-gammaray.h.cmake | 2 +-
15 injector/styleinjector.cpp | 2 +-
16 tools/widgetinspector/CMakeLists.txt | 2 +-
17 4 files changed, 6 insertions(+), 5 deletions(-)
19 diff --git a/CMakeLists.txt b/CMakeLists.txt
20 index 06bdc1c..bc69cd0 100644
23 @@ -87,6 +87,7 @@ include_directories(
24 set(LIB_SUFFIX "" CACHE STRING "Define suffix of directory name (32/64)")
25 set(LIB_INSTALL_DIR "lib${LIB_SUFFIX}")
26 set(PLUGIN_INSTALL_DIR "${LIB_INSTALL_DIR}/qt4/plugins")
27 +set(MODULE_INSTALL_DIR "${LIB_INSTALL_DIR}/gammaray")
30 INSTALL_TARGETS_DEFAULT_ARGS
31 @@ -314,7 +315,7 @@ endif()
33 qt4_add_resources(gammaray_srcs resources/gammaray.qrc)
34 add_library(gammaray_probe
35 - SHARED ${gammaray_srcs}
36 + MODULE ${gammaray_srcs}
38 if(BUILD_TIMER_PLUGIN AND NOT WIN32)
39 target_link_libraries(gammaray_probe rt)
40 @@ -328,7 +329,7 @@ if(NOT WIN32)
42 set_target_properties(gammaray_probe PROPERTIES PREFIX "")
44 -install(TARGETS gammaray_probe ${INSTALL_TARGETS_DEFAULT_ARGS})
45 +install(TARGETS gammaray_probe DESTINATION ${MODULE_INSTALL_DIR})
47 if(UNIX AND NOT APPLE)
48 set(XDG_APPS_INSTALL_DIR share/applications)
49 diff --git a/config-gammaray.h.cmake b/config-gammaray.h.cmake
50 index e1a24d2..c6c8b89 100644
51 --- a/config-gammaray.h.cmake
52 +++ b/config-gammaray.h.cmake
54 -#define GAMMARAY_LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR}"
55 +#define GAMMARAY_LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR}/gammaray"
56 #define GAMMARAY_PLUGIN_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/${PLUGIN_INSTALL_DIR}"
57 // for finding the probe during automatic tests
58 #define GAMMARAY_BUILD_DIR "${CMAKE_BINARY_DIR}"
59 diff --git a/injector/styleinjector.cpp b/injector/styleinjector.cpp
60 index 3d23a12..6b02dc1 100644
61 --- a/injector/styleinjector.cpp
62 +++ b/injector/styleinjector.cpp
63 @@ -94,7 +94,7 @@ bool StyleInjector::selfTest()
64 // TODO: be a bit more clever in finding the plugin location (also when actually using it above)
66 const QString stylePath =
67 - QLatin1String(GAMMARAY_LIB_INSTALL_DIR "/qt4/plugins/styles/gammaray_injector_style.so");
68 + QLatin1String(GAMMARAY_PLUGIN_INSTALL_DIR "/styles/gammaray_injector_style.so");
70 const QString stylePath =
71 QLatin1String(GAMMARAY_LIB_INSTALL_DIR "/qt4/plugins/styles/gammaray_injector_style.dll");
72 diff --git a/tools/widgetinspector/CMakeLists.txt b/tools/widgetinspector/CMakeLists.txt
73 index eefa624..e851f8d 100644
74 --- a/tools/widgetinspector/CMakeLists.txt
75 +++ b/tools/widgetinspector/CMakeLists.txt
76 @@ -10,4 +10,4 @@ target_link_libraries(gammaray_widget_export_actions
77 ${QT_QTDESIGNER_LIBRARIES}
80 -install(TARGETS gammaray_widget_export_actions ${INSTALL_TARGETS_DEFAULT_ARGS})
81 +install(TARGETS gammaray_widget_export_actions DESTINATION ${MODULE_INSTALL_DIR})