Zren / material-decoration

Material-ish window decoration theme for KWin, with LIM, based on zzag's original design.
GNU General Public License v2.0
197 stars 17 forks source link

Doesn't compile on kUbuntu 20.04 (since commit #3f724dcf436233d24abe9f2dfc450ba5d0ac00dd) #57

Closed xalt7x closed 2 years ago

xalt7x commented 2 years ago

Tried on a clean Kubuntu 20.04 install 1) ticked "Source code" on "Software Sources" application (same as uncommenting "deb-src" lines on /etc/apt/sources.list) 2)

sudo apt build-dep breeze
sudo apt build-dep kwin
sudo apt install git

3)

cd ~/Downloads
git clone https://github.com/Zren/material-decoration.git
cd material-decoration ; mkdir build ; cd build

4) cmake -DCMAKE_INSTALL_PREFIX=/usr ..
finishes with errors.

Just to make sure I started to browse though commit history and downloaded previous zip packages. The last package which builds properly on Ubuntu 20.04 is with commit #176c748524ac50865db988b9a6a7243f8da4e64f) (("Fix repainting the titlebar now that we have borders (Issue #41)". cmake_without_errors.txt

With the next commit #3f724dcf436233d24abe9f2dfc450ba5d0ac00dd) (("Refactor X11 window code") I've got cmake errors. cmake_with_errors.txt

With current KDE Neon User Edition latest "master" branch builds properly (it's not compatible with KWin 5.18.5 though).

Zren commented 2 years ago

Those 4 commits were sorta batched together. Try compiling 0277a1d6e1 aka "Update plasma-workspace/libdbusmenuqt@f07b7f1".

Not much changes other than formatting except:

diff --git a/src/libdbusmenuqt/CMakeLists.txt b/src/libdbusmenuqt/CMakeLists.txt
index 6ddc949..c8fd747 100644
--- a/src/libdbusmenuqt/CMakeLists.txt
+++ b/src/libdbusmenuqt/CMakeLists.txt
@@ -20,8 +20,8 @@ qt5_add_dbus_interface(libdbusmenu_SRCS com.canonical.dbusmenu.xml dbusmenu_inte

 add_library(dbusmenuqt STATIC ${libdbusmenu_SRCS})
 target_link_libraries(dbusmenuqt
-    Qt5::DBus
-    Qt5::Widgets
+    Qt::DBus
+    Qt::Widgets
 )

Does editing src/libdbusmenuqt/CMakeLists.txt and using Qt5::DBus work?

xalt7x commented 2 years ago

@Zren Thanks! I renamed both "Qt::DBus" and "Qt::Widgets" (also in "src/libdbusmenuqt/test/CMakeLists.txt") and now it builds properly. Patch bellow.

--- a/src/libdbusmenuqt/CMakeLists.txt
+++ b/src/libdbusmenuqt/CMakeLists.txt
@@ -20,8 +20,8 @@

 add_library(dbusmenuqt STATIC ${libdbusmenu_SRCS})
 target_link_libraries(dbusmenuqt
-    Qt::DBus
-    Qt::Widgets
+    Qt5::DBus
+    Qt5::Widgets
 )

 add_subdirectory(test)

--- a/src/libdbusmenuqt/test/CMakeLists.txt
+++ b/src/libdbusmenuqt/test/CMakeLists.txt
@@ -1,3 +1,3 @@
 add_executable(appmenutest main.cpp)
 target_link_libraries(appmenutest
-                        Qt::Widgets)
+                        Qt5::Widgets)
xalt7x commented 2 years ago

Tested again. CMake still fails (for a different reason)

CMake Error at src/libdbusmenuqt/CMakeLists.txt:18 (qt_add_dbus_interface):
  Unknown CMake command "qt_add_dbus_interface".

According to this page "qt_add_dbus_interface" was added in QT 5.15

P.S. I tried to revert commit "Use versionless qt macro in libdbusmenuqt (Issue #57) ".

Then generation continued but eventually got stuck again

-- Configuring done
CMake Error at src/libdbusmenuqt/test/CMakeLists.txt:1 (add_executable):
  Target "appmenutest" links to target "Qt::Widgets" but the target was not
  found.  Perhaps a find_package() call is missing for an IMPORTED target, or
  an ALIAS target is missing?
Zren commented 2 years ago

Missed the Qt::Widgets in the tests CMakeLists.txt. Thanks @Alt37.

I also forgot how old Kubuntu's Qt version is. I've added a if/else switch to use the versionless macro when it detects Qt6.

crosses fingers should work now?

xalt7x commented 2 years ago

I can confirm that now it compiles. Thanks for your awesome projects & support @Zren !