mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-25 05:48:07 -05:00
gnu: vulkan-loader: Don't build (and install) googletest.
* gnu/packages/vulkan.scm (vulkan-loader)[arguments]: Add phase to use system googletest. Remove unpack-googletest phase. [native-inputs]: Change from (PACKAGE-SOURCE GOOGLETEST) to GOOGLETEST.
This commit is contained in:
parent
bef257a1d7
commit
5a190fce5f
1 changed files with 13 additions and 10 deletions
|
@ -2,7 +2,7 @@
|
|||
;;; Copyright © 2017, 2018, 2019 Rutger Helling <rhelling@mykolab.com>
|
||||
;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
|
||||
;;; Copyright © 2018 Efraim Flashner <efraim@flashner.co.il>
|
||||
;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com>
|
||||
;;; Copyright © 2020, 2023 Marius Bakke <marius@gnu.org>
|
||||
;;; Copyright © 2021 Mathieu Othacehe <othacehe@gnu.org>
|
||||
;;; Copyright © 2022 Kaelyn Takata <kaelyn.alexi@protonmail.com>
|
||||
;;; Copyright © 2022 dan <i@dan.games>
|
||||
|
@ -232,8 +232,6 @@ (define-public vulkan-loader
|
|||
(dirname (dirname
|
||||
(search-input-directory
|
||||
%build-inputs "include/vulkan"))))
|
||||
(string-append "-DGOOGLETEST_INSTALL_DIR="
|
||||
(getcwd) "/source/external/googletest")
|
||||
"-DBUILD_TESTS=ON")
|
||||
#:phases
|
||||
#~(modify-phases %standard-phases
|
||||
|
@ -245,14 +243,19 @@ (define-public vulkan-loader
|
|||
(substitute* "loader/vulkan.pc.in"
|
||||
(("^includedir=.*")
|
||||
(string-append "includedir=" vulkan-headers "\n"))))))
|
||||
(add-after 'unpack 'unpack-googletest
|
||||
(lambda* (#:key native-inputs inputs #:allow-other-keys)
|
||||
(let ((gtest (search-input-directory (or native-inputs inputs)
|
||||
"googletest")))
|
||||
(copy-recursively (dirname gtest)
|
||||
"external/googletest")))))))
|
||||
(add-after 'unpack 'use-system-googletest
|
||||
(lambda _
|
||||
;; Inform the build system that googletest is already built.
|
||||
(substitute* "CMakeLists.txt"
|
||||
((".*if\\(TARGET gtest\\)")
|
||||
(string-append " find_package(GTest REQUIRED)\n"
|
||||
" if(true)")))
|
||||
;; Use the namespaced variable.
|
||||
(substitute* "tests/framework/CMakeLists.txt"
|
||||
(("PUBLIC gtest ")
|
||||
"PUBLIC GTest::gtest ")))))))
|
||||
(native-inputs
|
||||
(list (package-source googletest)
|
||||
(list googletest
|
||||
libxrandr
|
||||
pkg-config
|
||||
python
|
||||
|
|
Loading…
Reference in a new issue