TelepathyIM / telepathy-qt

Telepathy Qt bindings
https://telepathy.freedesktop.org
GNU Lesser General Public License v2.1
25 stars 14 forks source link

use GNUInstallDirs #30

Closed DerDakon closed 5 years ago

DerDakon commented 5 years ago

GNUInstallDirs.cmake has correct default for all sorts of directories, it also handles things like lib/lib32/lib64/… automagically. Porting to this module is advisable, it makes things much more portable. It also has a mechanism for users to override these defaults if necessary, which is also one that can be used on all projects using this modules.

Using the CMAKE_INSTALLFULL* variables of this module in the generated .pc file is advisable as it is the only way that things will work if e.g. the include dir is placed outside of ${prefix}.

Kaffeine commented 5 years ago

I think we'll fix this in a few days. This task is easy to implement but hard to test.

Kaffeine commented 5 years ago

It seems that anything related to the CMake mess is not Easy. Any change leads to a number of other wanted refactoring. I need to get some more experience with CMake before taking this task. Maybe it will be easier to rewrite from scratch than to update step-by-step. We need to make a new release with Python 3 support (already merged) and it would be much better to release with proper export for CMake targets.

Kaffeine commented 5 years ago

Hi @DerDakon,

I pushed a commit with GNUInstallDirs to the staging branch. Would you mind to test if it works for you? I did some local testing, but it definitely worth to test better.

Kaffeine commented 5 years ago

@DerDakon, thank you for the inline comment. It seems that I also messed up the commits during rebase, so the referenced commit had extra changes.

I force-pushed the branch, the new/fixed GNUInstallDirs commit ref is https://github.com/TelepathyIM/telepathy-qt/commit/019018e4bd4ab0274eda5cde021e92c3c6eb7f34

DerDakon commented 5 years ago

Works for me.

Kaffeine commented 5 years ago

https://github.com/TelepathyIM/telepathy-qt/commit/5f9d4fb3285a6d5e34ea99b2350a879f5f3f7ecd