class Vcpkg::Config

Overview

Configuration options for finding packages, setting up the tree and emitting metadata to crystal

Defined in:

config.cr

Constant Summary

Log = ::Log.for(self)

Constructors

Instance Method Summary

Constructor Detail

def self.new(crystal_metadata : Bool = true, emit_includes : Bool = false, required_libs : Array(String) = [] of String, required_dlls : Array(String) = [] of String, copy_dlls : Bool = true) #

[View source]

Instance Method Detail

def copy_dlls=(copy_dlls : Bool) #

should DLLs be copied to OUT_DIR? property copy_dlls : Bool = false


[View source]
def copy_dlls? : Bool #

should DLLs be copied to OUT_DIR? property copy_dlls : Bool = false


[View source]
def crystal_metadata : Bool #

should the crystal metadata actually be emitted


[View source]
def crystal_metadata=(crystal_metadata : Bool) #

should the crystal metadata actually be emitted


[View source]
def do_dll_copy(rlib : Library) : Ok(Int32) | Err(LibNotFound) #

[View source]
def do_dll_copy2(rlib : Library) : Ok(Nil) | Err(LibNotFound) #

[View source]
def emit_includes : Bool #

should crystal:include= metadata be emitted (defaults to false)


[View source]
def emit_includes=(emit_includes : Bool) #

should crystal:include= metadata be emitted (defaults to false)


[View source]
def emit_libs(rlib : Library, vcpkg_target : VcpkgTarget) : Ok(Int32) | Err(LibNotFound) #

[View source]
def envify(name : String) #

[View source]
def find_package(port_name : String) #

Define the find_package method


[View source]
def get_target_triplet : Ok(TargetTriplet) | Err(NotMSVC) #

Define the get_target_triplet method


[View source]
def lib_name(lib_stem : String) #

Override the name of the library to look for if it differs from the package name.

It should not be necessary to use #lib_name anymore. Calling #find_package with a package name will result in the correct library names. This may be called more than once if multiple libs are required. All libs must be found for the probe to succeed. .probe() must be run with a different configuration to look for libraries under one of several names. .libname("ssleay32") will look for ssleay32.lib and also ssleay32.dll if dynamic linking is selected.


[View source]
def lib_names(lib_stem : String, dll_stem : String) #

Override the name of the library to look for if it differs from the package name.

It should not be necessary to use #lib_names anymore. Calling #find_package with a package name will result in the correct library names. This may be called more than once if multiple libs are required. All libs must be found for the probe to succeed. .probe() must be run with a different configuration to look for libraries under one of several names. .lib_names("libcurl_imp","curl") will look for libcurl_imp.lib and also curl.dll if dynamic linking is selected.


[View source]
def required_dlls : Array(String) #

.dlls that must be found for probing to be considered successful


[View source]
def required_dlls=(required_dlls : Array(String)) #

.dlls that must be found for probing to be considered successful


[View source]
def required_libs : Array(String) #

.lib/.a files that must be found for probing to be considered successful


[View source]
def required_libs=(required_libs : Array(String)) #

.lib/.a files that must be found for probing to be considered successful


[View source]
def target : TargetTriplet | Nil #

[View source]
def target=(target : TargetTriplet | Nil) #

[View source]
def vcpkg_installed_root : Path | Nil #

override vcpkg installed path, regardless of both VCPKG_ROOT/installed and VCPKG_INSTALLED_ROOT environment variables


[View source]
def vcpkg_installed_root=(vcpkg_installed_root : Path | Nil) #

override vcpkg installed path, regardless of both VCPKG_ROOT/installed and VCPKG_INSTALLED_ROOT environment variables


[View source]
def vcpkg_root : Path | Nil #

override VCPKG_ROOT environment variable


[View source]
def vcpkg_root=(vcpkg_root : Path | Nil) #

override VCPKG_ROOT environment variable


[View source]