[gtk: 1/2] build: fix gi-docgen detection in cross builds




commit 98796d4513f04cb2f4dbe55fa55af4504b1ac610
Author: Michal Vasilek <michal vasilek cz>
Date:   Sun Sep 18 20:48:21 2022 +0200

    build: fix gi-docgen detection in cross builds
    
    gi-docgen is supposed to be ran natively on the build machine, without
    native: true dependency() searches for gi-docgen on the host system.
    When it doesn't find it, it falls back to a subproject even if gi-docgen
    is available on the build machine.
    
    also make gtk_doc require introspection

 meson.build | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/meson.build b/meson.build
index f45da9dce3..a4e69be6d1 100644
--- a/meson.build
+++ b/meson.build
@@ -443,7 +443,8 @@ iso_codes_dep  = dependency('iso-codes', required: false)
 
 gidocgen_dep    = dependency('gi-docgen', version: '>= 2021.1',
                              fallback: ['gi-docgen', 'dummy_dep'],
-                             required: get_option('gtk_doc'))
+                             required: get_option('gtk_doc') and get_option('introspection').enabled(),
+                             native: true)
 gi_dep         = dependency('gobject-introspection-1.0', version: introspection_req,
                             required: get_option('introspection').enabled() and
                                       get_option('build-tests'))


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]