Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to configure plugins and libexec installation destination #69

Closed
danvratil opened this issue Jan 22, 2014 · 3 comments
Closed

Unable to configure plugins and libexec installation destination #69

danvratil opened this issue Jan 22, 2014 · 3 comments

Comments

@danvratil
Copy link
Contributor

Passing -DLIBEXEC_INSTALL_DIR=/usr/libexec/gammaray to CMake has no impact and gammaray-launcher and gammaray-client are always installed to /usr/lib64/gammaray/libexec. Although this is a good default, it would still be nice if packagers could choose the destination (e.g. /usr/libexec/gammaray, as recommended by Fedora packaging guidelines).

Passing -DPLUGIN_INSTALL_DIR=/usr/lib64/qt4/plugins to CMake is ignored by all plugins (they install to /usr/lib64/gammaray/version/qt-build/), except for gammaray_kjobtracker, which installs to /usr/lib64/plugins/version/qt-build/.

I tried making the variables configurable by users (see the patch below), which worked for plugins, but has broken lookup of the libexec utilities:

$ gammaray                                                                      
"gammaray-launcher" not found in the expected location(s): 
"/usr/bin/..//bin/gammaray-launcher, /usr/bin/..///usr/libexec/gammaray-launcher" 
continuing anyway, hoping for it to be in PATH. 

libexec is usually not in PATH, so it does not work :)

diff --git a/CMakeLists.txt b/CMakeLists.txt                                                                                                                                                                                         
index bdffd69..fc8b312 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -259,8 +259,12 @@ if(WIN32)
   set(PLUGIN_INSTALL_DIR "plugins")
   set(LIBEXEC_INSTALL_DIR "${BIN_INSTALL_DIR}")
 else()
-  set(PLUGIN_INSTALL_DIR "${LIB_INSTALL_DIR}/gammaray")
-  set(LIBEXEC_INSTALL_DIR "${LIB_INSTALL_DIR}/gammaray/libexec")
+  if(NOT PLUGIN_INSTALL_DIR)
+    set(PLUGIN_INSTALL_DIR "${LIB_INSTALL_DIR}/gammaray")
+  endif()
+  if(NOT LIBEXEC_INSTALL_DIR)
+    set(LIBEXEC_INSTALL_DIR "${LIB_INSTALL_DIR}/gammaray/libexec")
+  endif()
 endif()
 if(UNIX AND NOT APPLE)
   set(DOC_INSTALL_DIR share/doc/gammaray/)
@vkrause
Copy link
Contributor

vkrause commented Jan 23, 2014

Your solution might almost work, I think the problem is that you are passing absolute paths while it expects relative paths to CMAKE_INSTALL_PREFIX there (that's why you get the weird paths in the error message). A few lines down from your patch it computes the relative paths between various components, so they find each other. So either you pass in relative paths to begin with, or you can probably handle the absolute path case there.

While your alternate libexec dir should be no problem, I don't really like the plugin path ;-)
First of all, these are GammaRay plugins, not Qt4 plugins. More importantly though, these paths are designed to enable multi-arch and multi-Qt co-installations of GammaRay probes while using a single GammaRay launcher and client (there's a build option for only building probes for that), something we figured would be especially popular with packagers ;-) This however only works if all GammaRay plug-ins end up in the same place. If you just want to change the base path, that again shouldn't be a problem though.

@danvratil
Copy link
Contributor Author

Yay, relative LIBEXEC_INSTALL_DIR works :-)

For the plugins, I was only trying to change /usr/lib64/gammaray to /usr/lib64/qt4/plugins/gammaray (the rest of the path is fine) but you are right about them not really being Qt plugins. I tried setting PLUGIN_INSTALL_DIR=plugins (just for fun ;-)), but then the path was expanded to $pwd/plugins/, so make install installed the plugins into the build directory, while their .desktop files ended in CMAKE_INSTALL_PREFIX/plugins, as expected.

@krf
Copy link
Contributor

krf commented Mar 18, 2014

Can we close this?

@krf krf closed this as completed Jul 2, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants