all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
blob 25b5952bdac9fc29011d6d0b4fbc83347d79baef 1386 bytes (raw)
name: gnu/packages/patches/openboardview-use-system-utf8.patch 	 # note: path name is non-authoritative(*)

 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
46
47
48
 
From 251e23422f37c93a3f460fb660c5e5bfa8200d91 Mon Sep 17 00:00:00 2001
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Date: Sun, 2 Dec 2018 16:40:39 -0500
Subject: [PATCH] build system: Allow using utf8.h from the system.

---
 src/CMakeLists.txt               | 12 ++++++++----
 src/openboardview/CMakeLists.txt |  1 +
 2 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 90442ed..26d4a69 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -8,10 +8,14 @@ if(NOT WIN32 OR MINGW)
 endif()
 
 ## utf8.h ##
-execute_process(
-	COMMAND git submodule update --init src/utf8
-	WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
-)
+FIND_PATH(UTF8_INCLUDE_DIR utf8.h)
+if(NOT UTF8_INCLUDE_DIR)
+  execute_process(
+    COMMAND git submodule update --init src/utf8
+    WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
+    )
+  set(UTF8_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/utf8)
+endif()
 
 ## zlib ##
 find_package(ZLIB)
diff --git a/src/openboardview/CMakeLists.txt b/src/openboardview/CMakeLists.txt
index b0bdbe3..6c4564c 100644
--- a/src/openboardview/CMakeLists.txt
+++ b/src/openboardview/CMakeLists.txt
@@ -44,6 +44,7 @@ include_directories(
 	${CMAKE_CURRENT_SOURCE_DIR}
 	${CMAKE_CURRENT_SOURCE_DIR}/..
 	${IMGUI_INCLUDE_DIRS}
+	${UTF8_INCLUDE_DIR}
 	${GLAD_INCLUDE_DIRS}
 	${GTK_INCLUDE_DIRS}
 	${OPENGL_INCLUDE_DIR}
-- 
2.34.0


debug log:

solving 25b5952bda ...
found 25b5952bda in https://git.savannah.gnu.org/cgit/guix.git

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.