lxqt / libqtxdg

Qt implementation of freedesktop.org xdg specs
https://lxqt.github.io
GNU Lesser General Public License v2.1
72 stars 35 forks source link

Ilya fedin fix static build #215

Open luis-pereira opened 4 years ago

luis-pereira commented 4 years ago

Fixes https://github.com/lxqt/libqtxdg/issues/208. @Ilya87 Can't write to https://github.com/lxqt/libqtxdg/pull/212. So I created this PR with your commits and mine on top. Tested with shared and static builds.

ilya-fedin commented 4 years ago

Thanks! Looks valid :thinking:

luis-pereira commented 4 years ago

@ilya-fedin Did you put this to the test ?

ilya-fedin commented 4 years ago

Did you put this to the test ?

I tested with tdesktop's cmake rules a long time ago, but testing with lxqt-qtplugin's cmake rules wouldn't be an easy task with tdesktop 😥

luis-pereira commented 4 years ago

I tested with tdesktop's cmake rules a long time ago, but testing with lxqt-qtplugin's cmake rules wouldn't be an easy task with tdesktop disappointed_relieved

I'm confused. So what's the purpose ?

ilya-fedin commented 4 years ago

I'm confused. So what's the purpose ?

To get lxqt's icon theme & other appearance settings even on static binary

luis-pereira commented 4 years ago

To get lxqt's icon theme & other appearance settings even on static binary

Of course. I meant a PR that can't be tested.

ilya-fedin commented 4 years ago

I meant a PR that can't be tested.

I don't know. I tried to build libqtxdg with upstream cmake rules, but encountered into Requested 'glib-2.0 >= 2.50' but version of GLib is 2.40.2 when building lxqt-build-tools, static build of tdesktop works only on Ubuntu 14.04 due to hardcoded paths and hacks like glibc wraps :see_no_evil:

luis-pereira commented 4 years ago

libqtxdg requires 2.41. Version 2.50 is a libfm-qt requirement.

I wasn't aware that lxqt-build-tools had Qt5 and GLIB requirements. I was actually asked for a review, but never did, some real life issues got in the way.

The purpose of such requirements are probably to fail as soon as possible. I don't agree with version check at lxqt-build-tools. The packages needed to build LXQt are much more than those two.

ilya-fedin commented 4 years ago

libqtxdg requires 2.41.

It is still greater than 2.40 (even though I need only xdgiconloader for lxqt-qtplugin) :(

CMake Error at /opt/cmake/share/cmake-3.17/Modules/FindPackageHandleStandardArgs.cmake:164 (message):
  Could NOT find GLIB: Found unsuitable version "2.40.2", but required is at
  least "2.41.0" (found
  /usr/include/glib-2.0;/usr/lib/x86_64-linux-gnu/glib-2.0/include)
ilya-fedin commented 4 years ago

I removed the check and confirm that this PR doesn't work with upstream cmake rules 28_LibQtXdg..txt