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.
Vcpkg
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.
root
The Vcpkg triplet. By default this is what perl_triplet from Win32::Vcpkg returns.
perl_triplet
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.
.lib
cflags
libs
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.
To install Win32::Vcpkg, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Win32::Vcpkg
CPAN shell
perl -MCPAN -e shell install Win32::Vcpkg
For more information on module installation, please visit the detailed CPAN module installation guide.