File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -106,8 +106,10 @@ xml2_min_ver = '2.7.7'
106
106
xml2_req = ' >= @0@' .format(xml2_min_ver)
107
107
xml2_dep = dependency (' libxml-2.0' , version : xml2_req, required : host_machine .system() != ' windows' )
108
108
109
+ libxml2_lib_set = false
109
110
if not xml2_dep.found()
110
111
libxml2_lib = ' libxml2'
112
+ libxml2_lib_set = true
111
113
xml2_dep = cpp_compiler.find_library (libxml2_lib,
112
114
has_headers : [
113
115
' libxml/globals.h' ,
@@ -152,7 +154,9 @@ libxml2_lib_pkgconfig = ''
152
154
if xml2_dep.type_name() == ' pkgconfig'
153
155
xmlxx_requires += [' libxml-2.0' , xml2_req]
154
156
else
155
- libxml2_lib_pkgconfig = ' -l@0@' .format(libxml2_lib)
157
+ if libxml2_lib_set
158
+ libxml2_lib_pkgconfig = ' -l@0@' .format(libxml2_lib)
159
+ endif
156
160
endif
157
161
158
162
xmlxx_requires = ' ' .join(xmlxx_requires)
You can’t perform that action at this time.
0 commit comments