Use the Meson buildsystem on Windows with external libraries

Viewed 355

I am using the Meson buildsystem for a C++ project on Windows. I installed Meson, Ninja and MinGW (using a Windows package manager called Chocolatey). But I don't know where I should place external dependencies so Meson can find them (dependency('...')). Can I somehow use vcpkg for that or is there a better suited package manager?

I tried configuring MinGW environment variables LIBRARY_PATH, C_INCLUDE_PATH and CPLUS_INCLUDE_PATH but it didn't work.

My Meson file looks somewhat like this:

deps = [
    dependency('glfw3'),
    dependency('gl'),
    dependency('glew'),
]

my_library = library(
    'mylib',
    [source_files, header_files],
    dependencies : deps,
    # ...
)

my_dep= declare_dependency(
    link_with : my_library ,
    # ...
)

0 Answers
Related