Skip to content

Windows meson build has undefined variable problems #67

Closed
@talisein

Description

@talisein

libxmlplusplus/meson.build

Lines 110 to 117 in ab5098e

xml2_dep = dependency(
['libxml-2.0', 'LibXml2'],
version: xml2_req,
required: host_machine.system() != 'windows'
)
# Setup CMake subproject for use, if needed
if not xml2_dep.found()

The required: is problematic, because projects using libxml++ may also depend on libxml-2.0 themselves. That means meson will resolve the dep and cache it before it sees this Requires. So xml2_dep.found() will be true on windows. This means...

winsock_dep = cpp_compiler.find_library('ws2_32', required: false)

This winsock_dep, bcrypt_dep, and xml2_sp variables which are inside the if not xml2_dep.found() won't be set. xml2_sp is only used if build-tests is true, but there's no way around needing the winsock_dep variable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions