Unverified Commit 03efc970 authored by Cosima Neidahl's avatar Cosima Neidahl Committed by GitHub
Browse files

lomiri.lomiri-download-manager: Fix compatibility with glog 0.7.x (#375360)

parents 9782af55 3cfe557b
Loading
Loading
Loading
Loading
+154 −0
Original line number Diff line number Diff line
From a487908c22fe0a37669bbe5a8bdcd945b05b2f33 Mon Sep 17 00:00:00 2001
From: OPNA2608 <opna2608@protonmail.com>
Date: Mon, 20 Jan 2025 19:06:54 +0100
Subject: [PATCH] treewide: Switch to glog CMake module

---
 CMakeLists.txt                           | 2 +-
 src/common/priv/CMakeLists.txt           | 2 +-
 src/common/public/CMakeLists.txt         | 2 +-
 src/downloads/daemon/CMakeLists.txt      | 2 +-
 src/downloads/priv/CMakeLists.txt        | 2 +-
 src/downloads/qml/CMakeLists.txt         | 2 +-
 src/downloads/test-daemon/CMakeLists.txt | 2 +-
 src/extractor/CMakeLists.txt             | 2 +-
 src/uploads/daemon/CMakeLists.txt        | 2 +-
 src/uploads/priv/CMakeLists.txt          | 2 +-
 10 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8c4750a2..e44d09ad 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -50,10 +50,10 @@ set(CMAKE_AUTOMOC ON)
 
 find_package(Qt5 COMPONENTS Core DBus Network Sql Test REQUIRED)
 find_package(Boost COMPONENTS log program_options REQUIRED)
+find_package(glog REQUIRED)
 
 find_package(PkgConfig REQUIRED)
 pkg_check_modules(DBUS REQUIRED dbus-1)
-pkg_check_modules(GLOG REQUIRED libglog)
 pkg_check_modules(LOMIRI_API REQUIRED liblomiri-api)
 
 if(USE_SYSTEMD)
diff --git a/src/common/priv/CMakeLists.txt b/src/common/priv/CMakeLists.txt
index e7723f3d..105ec5d2 100644
--- a/src/common/priv/CMakeLists.txt
+++ b/src/common/priv/CMakeLists.txt
@@ -75,7 +75,7 @@ set_target_properties(
 
 target_link_libraries(${TARGET}
 	${LOMIRI_API_LDFLAGS}
-	${GLOG_LIBRARIES}
+	glog::glog
 	Qt5::Network
 	Qt5::Sql
 	Qt5::Core
diff --git a/src/common/public/CMakeLists.txt b/src/common/public/CMakeLists.txt
index 4b1e8660..eeeeab13 100644
--- a/src/common/public/CMakeLists.txt
+++ b/src/common/public/CMakeLists.txt
@@ -50,7 +50,7 @@ set_target_properties(
 )
 
 target_link_libraries(${TARGET}
-	${GLOG_LIBRARIES}
+	glog::glog
 	Qt5::DBus
 	Qt5::Network
 )
diff --git a/src/downloads/daemon/CMakeLists.txt b/src/downloads/daemon/CMakeLists.txt
index cdc9f83b..24e2334c 100644
--- a/src/downloads/daemon/CMakeLists.txt
+++ b/src/downloads/daemon/CMakeLists.txt
@@ -16,7 +16,7 @@ add_executable(${TARGET}
 )
 
 target_link_libraries(${TARGET}
-	${GLOG_LIBRARIES}
+	glog::glog
 	Qt5::Core
 	ldm-common
 	ldm-priv-common
diff --git a/src/downloads/priv/CMakeLists.txt b/src/downloads/priv/CMakeLists.txt
index 9eaf3092..c453a7a1 100644
--- a/src/downloads/priv/CMakeLists.txt
+++ b/src/downloads/priv/CMakeLists.txt
@@ -65,7 +65,7 @@ set_target_properties(
 )
 
 target_link_libraries(${TARGET}
-	${GLOG_LIBRARIES}
+	glog::glog
 	Qt5::DBus
 	Qt5::Sql
 	ldm-common
diff --git a/src/downloads/qml/CMakeLists.txt b/src/downloads/qml/CMakeLists.txt
index 7e2d9285..49d68f1c 100644
--- a/src/downloads/qml/CMakeLists.txt
+++ b/src/downloads/qml/CMakeLists.txt
@@ -34,7 +34,7 @@ find_package(Qt5 COMPONENTS Core Qml Quick REQUIRED)
 target_link_libraries(${TARGET} Qt5::Core Qt5::Qml Qt5::Quick)
 
 target_link_libraries(${TARGET}
-	${GLOG_LIBRARIES}
+	glog::glog
 	ldm-common
 	lomiri-download-manager-common
 	lomiri-download-manager-client
diff --git a/src/downloads/test-daemon/CMakeLists.txt b/src/downloads/test-daemon/CMakeLists.txt
index d12207a1..6734e65d 100644
--- a/src/downloads/test-daemon/CMakeLists.txt
+++ b/src/downloads/test-daemon/CMakeLists.txt
@@ -30,7 +30,7 @@ add_executable(${TARGET}
 )
 
 target_link_libraries(${TARGET}
-	${GLOG_LIBRARIES}
+	glog::glog
 	Qt5::Core
 	Qt5::DBus
 	Qt5::Network
diff --git a/src/extractor/CMakeLists.txt b/src/extractor/CMakeLists.txt
index 8c40b9b5..3615d5c7 100644
--- a/src/extractor/CMakeLists.txt
+++ b/src/extractor/CMakeLists.txt
@@ -23,7 +23,7 @@ add_executable(${TARGET}
 )
 
 target_link_libraries(${TARGET}
-	${GLOG_LIBRARIES}
+	glog::glog
 	Qt5::Core
 	${Boost_LIBRARIES}
 	ldm-priv-common
diff --git a/src/uploads/daemon/CMakeLists.txt b/src/uploads/daemon/CMakeLists.txt
index 157c6fd6..3692d3c9 100644
--- a/src/uploads/daemon/CMakeLists.txt
+++ b/src/uploads/daemon/CMakeLists.txt
@@ -16,7 +16,7 @@ add_executable(${TARGET}
 )
 
 target_link_libraries(${TARGET}
-	${GLOG_LIBRARIES}
+	glog::glog
 	Qt5::Core
 	ldm-common
 	ldm-priv-common
diff --git a/src/uploads/priv/CMakeLists.txt b/src/uploads/priv/CMakeLists.txt
index dff67e35..672e49ef 100644
--- a/src/uploads/priv/CMakeLists.txt
+++ b/src/uploads/priv/CMakeLists.txt
@@ -47,7 +47,7 @@ set_target_properties(
 )
 
 target_link_libraries(${TARGET}
-	${GLOG_LIBRARIES}
+	glog::glog
 	Qt5::DBus
 	Qt5::Sql
 	ldm-common
-- 
2.47.1
+4 −0
Original line number Diff line number Diff line
@@ -51,6 +51,10 @@ stdenv.mkDerivation (finalAttrs: {
      revert = true;
      hash = "sha256-xS0Wz6d+bZWj/kDGK2WhOduzyP4Rgz3n9n2XY1Zu5hE=";
    })

    # Fix compatibility with glog 0.7.x
    # Remove when https://gitlab.com/ubports/development/core/lomiri-download-manager/-/merge_requests/29 merged & in release (vendored patch was manually backported)
    ./1001-treewide-Switch-to-glog-CMake-module.patch
  ];

  postPatch = ''