# CMAKE\_DISABLE\_FIND\_PACKAGE\_xxx equivalent for the PkgConfig module

**URL:** https://discourse.cmake.org/t/cmake-disable-find-package-xxx-equivalent-for-the-pkgconfig-module/15583
**Category:** Usage
**Created:** [March 30, 2026, 3:44pm UTC](https://discourse.cmake.org/t/cmake-disable-find-package-xxx-equivalent-for-the-pkgconfig-module/15583 "2026-03-30T15:44:04Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![MathisMARION](https://discourse.cmake.org/user_avatar/discourse.cmake.org/mathismarion/32/6078_2.png) [@MathisMARION](https://discourse.cmake.org/u/MathisMARION)
#### Post date: [March 30, 2026, 3:44pm UTC](https://discourse.cmake.org/t/cmake-disable-find-package-xxx-equivalent-for-the-pkgconfig-module/15583/1 "2026-03-30T15:44:04Z")

</div>

Being able to disable a dependency without uninstalling it from my system is very useful for testing various build configurations locally. [CMAKE\_DISABLE\_FIND\_PACKAGE\_xxx](https://cmake.org/cmake/help/latest/variable/CMAKE_DISABLE_FIND_PACKAGE_PackageName.html) allows to do this easily for native CMake dependencies. However there does not seem to be an equivalent option for the [PkgConfig](https://cmake.org/cmake/help/latest/module/FindPkgConfig.html) module. What is the recommended way to disable a pkg-config dependency?
