Win32::Vcpkg::Package - Interface to Microsoft Vcpkg Packages
version 0.04
use Win32::Vcpkg::Package; my $package = Win32::Vcpkg::Package->new( lib => ['foo','bar'], ); my $cflags = $package->cflags; my $libs = $package->libs;
This module provides an interface to a Vcpkg
package. Vcpkg
is a Visual C++ library package manager, and as such is useful in building XS and FFI extensions for Visual C++ builds of Perl. Given a list of libraries, this module will search for them, and if found you can get the compiler and linker flags needed to compile and link against them.
my $package = Win32::Vcpkg::Package->new(%options);
Creates a package instance. If the libraries specified are not found then an exception will be thrown.
The Vcpkg
root. By default this is what root
from Win32::Vcpkg returns.
The Vcpkg
triplet. By default this is what perl_triplet
from Win32::Vcpkg returns.
Array reference of library names. Do not include the .lib
extension. If not provided, then no libraries will be linked against, but this might be useful to get the compiler flags (cflags
) and linker flags (libs
) needed for Vcpkg
.
Array reference of include names. Some packages put their header files in a subdirectory, here you can specify the name of the subdirectory so that it will be included in cflags
.
If true, link against the debug version of the libraries.
my $name = $package->name;
Returns the name of the package, if known.
my $version = $package->version;
Returns the version of the package, if known.
my $root = $package->root;
The Vcpkg
root. This is an Path::Tiny object.
my $triplet = $package->triplet;
The Vcpkg
triplet.
my $cflags = $package->cflags;
The compiler flags needed to compile against the package.
my $libs = $package->libs;
The linker flags needed to link against the package.
Graham Ollis <plicease@cpan.org>
This software is copyright (c) 2020 by Graham Ollis.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.