summaryrefslogtreecommitdiff
blob: 965a8a9d82dedaaf24619f9f620eed1644dcd871 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
From 6dfceab2bacef67ea27b4d1045100b6e0d2be430 Mon Sep 17 00:00:00 2001
From: Antonio Rojas <arojas@archlinux.org>
Date: Wed, 5 Jul 2023 14:00:29 +0200
Subject: [PATCH] Use protobuf cmake targets instead of variables

Makes it compatible with protobuf's upstream cmake config, which is required for protobuf>=22 as the cmake provided module is broken with it.
---
 src/osm/io/CMakeLists.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/osm/io/CMakeLists.txt b/src/osm/io/CMakeLists.txt
index bf1d02c9..ec95f7e5 100644
--- a/src/osm/io/CMakeLists.txt
+++ b/src/osm/io/CMakeLists.txt
@@ -1,7 +1,7 @@
 # SPDX-FileCopyrightText: 2020-2022 Volker Krause <vkrause@kde.org>
 # SPDX-License-Identifier: BSD-2-Clause
 
-if (Protobuf_FOUND AND Protobuf_PROTOC_EXECUTABLE)
+if (Protobuf_FOUND AND TARGET protobuf::protoc)
     PROTOBUF_GENERATE_CPP(pbf_srcs pbf_hdrs
         ../pbf/fileformat.proto
         ../pbf/osmformat.proto
@@ -19,7 +19,7 @@ if (Protobuf_FOUND AND Protobuf_PROTOC_EXECUTABLE)
     set_target_properties(KOSM_pbfioplugin PROPERTIES POSITION_INDEPENDENT_CODE ON)
     target_link_libraries(KOSM_pbfioplugin
         PUBLIC KOSM
-        PRIVATE ${Protobuf_LIBRARIES} ZLIB::ZLIB
+        PRIVATE protobuf::libprotobuf ZLIB::ZLIB
     )
 endif()
 
-- 
GitLab