🌻 📖 Win32::Vcpkg::Package

NAME

Win32::Vcpkg::Package - Interface to Microsoft Vcpkg Packages

VERSION

version 0.04

SYNOPSIS

 use Win32::Vcpkg::Package;
 
 my $package = Win32::Vcpkg::Package->new(
   lib => ['foo','bar'],
 );
 
 my $cflags = $package->cflags;
 my $libs   = $package->libs;

DESCRIPTION

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.

CONSTRUCTOR

new

 my $package = Win32::Vcpkg::Package->new(%options);

Creates a package instance. If the libraries specified are not found then an exception will be thrown.

root

The Vcpkg root. By default this is what root from Win32::Vcpkg returns.

triplet

The Vcpkg triplet. By default this is what perl_triplet from Win32::Vcpkg returns.

lib

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.

include

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.

debug

If true, link against the debug version of the libraries.

ATTRIBUTES

name

 my $name = $package->name;

Returns the name of the package, if known.

version

 my $version = $package->version;

Returns the version of the package, if known.

root

 my $root = $package->root;

The Vcpkg root. This is an Path::Tiny object.

triplet

 my $triplet = $package->triplet;

The Vcpkg triplet.

cflags

 my $cflags = $package->cflags;

The compiler flags needed to compile against the package.

libs

 my $libs = $package->libs;

The linker flags needed to link against the package.

SEE ALSO

Win32::Vcpkg
Win32::Vcpkg::List

AUTHOR

Graham Ollis <plicease@cpan.org>

COPYRIGHT AND LICENSE

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.