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
36
37
38
39
40
41
42
43
44
45
| | From a3c3c1ae0ec15f3ca5ea7696d92958ecf68688a7 Mon Sep 17 00:00:00 2001
From: Saku Laesvuori <saku@laesvuori.fi>
Date: Sun, 26 Nov 2023 12:22:27 +0200
Subject: [PATCH] Unbundle cppgir
---
external/glib/CMakeLists.txt | 8 --------
external/glib/generate_cppgir.cmake | 2 ++
2 files changed, 2 insertions(+), 8 deletions(-)
diff --git a/external/glib/CMakeLists.txt b/external/glib/CMakeLists.txt
index 3c6fe4b..ee057a4 100644
--- a/external/glib/CMakeLists.txt
+++ b/external/glib/CMakeLists.txt
@@ -7,14 +7,6 @@
add_library(external_glib INTERFACE IMPORTED GLOBAL)
add_library(desktop-app::external_glib ALIAS external_glib)
-function(add_cppgir) # isolate scope
- set(BUILD_TESTING OFF)
- set(BUILD_DOC OFF)
- set(BUILD_EXAMPLES OFF)
- add_subdirectory(cppgir EXCLUDE_FROM_ALL)
-endfunction()
-add_cppgir()
-
include(generate_cppgir.cmake)
generate_cppgir(external_glib Gio-2.0)
diff --git a/external/glib/generate_cppgir.cmake b/external/glib/generate_cppgir.cmake
index c9872a6..7925cf4 100644
--- a/external/glib/generate_cppgir.cmake
+++ b/external/glib/generate_cppgir.cmake
@@ -4,6 +4,8 @@
# For license and copyright information please follow this link:
# https://github.com/desktop-app/legal/blob/master/LEGAL
+find_package(CppGir REQUIRED gi)
+
function(generate_cppgir target_name gir)
# cppgir generates all the dependent headers everytime, better to have a global folder
set(gen_dst ${CMAKE_BINARY_DIR}/gen)
--
2.41.0
|