From 15056f47c217d87bf0914735fb52833a5457dc37 Mon Sep 17 00:00:00 2001 From: John Kehayias Date: Tue, 27 Jun 2023 20:43:44 -0400 Subject: gnu: imgui: Use #:make-flags. * gnu/packages/toolkits.scm (imgui)[arguments]: Add #:make-flags to replace compiler arguments in the 'build phase. --- gnu/packages/toolkits.scm | 54 +++++++++++++++++++++++++---------------------- 1 file changed, 29 insertions(+), 25 deletions(-) diff --git a/gnu/packages/toolkits.scm b/gnu/packages/toolkits.scm index aee6c22e2d..1af10d83f4 100644 --- a/gnu/packages/toolkits.scm +++ b/gnu/packages/toolkits.scm @@ -1,7 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2022, 2023 Maxim Cournoyer ;;; Copyright © 2020, 2022 Tobias Geerinckx-Rice -;;; Copyright © 2022 John Kehayias +;;; Copyright © 2022, 2023 John Kehayias ;;; ;;; This file is part of GNU Guix. ;;; @@ -55,6 +55,18 @@ (define-public imgui (guix build utils) (ice-9 ftw) (srfi srfi-26)) + ;; The build phase does not use make but we will use make-flags in a + ;; similar fashion to make inheritance for older imgui versions easier. + #:make-flags + ;; This first option is necessary at least for OpenBoardView, otherwise + ;; it would fail with the "Too many vertices in ImDrawList using 16-bit + ;; indices". + #~(list "-DImDrawIdx=unsigned int" + "-I" (string-append (getcwd) "/source") + "-I" (search-input-directory %build-inputs "include/freetype2") + "-g" "-O2" "-fPIC" "-shared" + "-lGL" "-lSDL2" "-lglfw" + "-o" "libimgui.so") #:phases #~(modify-phases %standard-phases (add-after 'unpack 'adjust-includes @@ -64,32 +76,24 @@ (define-public imgui "#include )) -- cgit v1.2.3