R/utils.R

#' pkg-config snapshot from install time
#'
#' Returns a data.frame with columns
#' `module`, `cflags`, `libs`, `static_libs`.
#'
#' @keywords internal
pkgcfg_db = local({
	cache = NULL
	function() {
		if (is.null(cache)) {
			path = system.file(
				"extdata",
				"pkgcfg_db.rds",
				package = "libdeflate"
			)
			cache <<- if (file.exists(path)) readRDS(path) else data.frame()
		}
		cache
	}
})

Try the libdeflate package in your browser

Any scripts or data that you put into this service are public.

libdeflate documentation built on June 29, 2025, 5:07 p.m.