--- a/Source/cmake/FindGI.cmake +++ b/Source/cmake/FindGI.cmake @@ -262,6 +262,7 @@ function(GI_INTROSPECT namespace nsversi foreach (dep IN LISTS opt_DEPENDENCIES) if (TARGET "gir-${dep}") get_property(dep_gir_path TARGET "gir-${dep}" PROPERTY GI_GIR_PATH) + get_property(dep_gir_lib TARGET "gir-${dep}" PROPERTY GI_GIR_LIBRARY) if (dep_gir_path) list(APPEND scanner_flags "--include-uninstalled=${dep_gir_path}") list(APPEND gir_deps "${dep_gir_path}") @@ -271,6 +272,9 @@ function(GI_INTROSPECT namespace nsversi "been previously configured with GI_INTROSPECT()" ) endif () + if (dep_gir_lib) + list(APPEND scanner_flags "--library=${dep_gir_lib}") + endif () elseif (dep MATCHES "^([a-zA-Z0-9._-]+):([a-z0-9._\\+-]+)$") list(APPEND scanner_flags "--include=${CMAKE_MATCH_1}" @@ -395,5 +399,6 @@ function(GI_INTROSPECT namespace nsversi # Record in targets to use later on e.g. with gi-docgen. set_property(TARGET "gir-${namespace}" PROPERTY GI_GIR_PATH "${gir_path}") + set_property(TARGET "gir-${namespace}" PROPERTY GI_GIR_LIBRARY "$") set_property(TARGET "gir-${namespace}" PROPERTY GI_PACKAGE "${opt_PACKAGE}-${nsversion}") endfunction()