vcpkg/docs/maintainers/internal/z_vcpkg_setup_pkgconfig_path.cmake.md
Jack·Boos·Yu 0d7603c4ef
[vcpkg_setup_pkgconfig_path] Add new functions to set or restore pkgconfig related environment variables (#23429)
* [vcpkg_configure_meson] Fix append host path

* New functions vcpkg_setup_pkgconfig_path and vcpkg_restore_pkgconfig_path

* Fix bug, add cos

* Apply suggestions

* Apply suggestions

* Apply suggestion

* doc

* Update docs/maintainers/vcpkg_setup_pkgconfig_path.cmake.md

Co-authored-by: LilyWangLL <94091114+LilyWangLL@users.noreply.github.com>

* Update scripts/cmake/vcpkg_setup_pkgconfig_path.cmake

Co-authored-by: LilyWangLL <94091114+LilyWangLL@users.noreply.github.com>

* Update scripts/cmake/vcpkg_configure_make.cmake

* Apply suggestions

* Apply suggestion

* Apply suggestions

Co-authored-by: Victor Romero <viromer@microsoft.com>
Co-authored-by: LilyWangLL <94091114+LilyWangLL@users.noreply.github.com>
2022-05-09 17:23:32 -07:00

671 B

z_vcpkg_setup_pkgconfig_path

Setup the generated pkgconfig file path to PKG_CONFIG_PATH environment variable or restore PKG_CONFIG_PATH environment variable.

z_vcpkg_setup_pkgconfig_path(BASE_DIRS <"${CURRENT_INSTALLED_DIR}" ...>)
z_vcpkg_restore_pkgconfig_path()

z_vcpkg_setup_pkgconfig_path prepends lib/pkgconfig and share/pkgconfig directories for the given BASE_DIRS to the PKG_CONFIG_PATH environment variable. It creates or updates a backup of the previous value. z_vcpkg_restore_pkgconfig_path shall be called when leaving the scope which called z_vcpkg_setup_pkgconfig_path in order to restore the original value from the backup.