# How to find FindPkgConfig.cmake on Windows

**URL:** https://discourse.cmake.org/t/how-to-find-findpkgconfig-cmake-on-windows/11615
**Category:** Usage
**Created:** [September 8, 2024, 9:54pm UTC](https://discourse.cmake.org/t/how-to-find-findpkgconfig-cmake-on-windows/11615 "2024-09-08T21:54:11Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Rich\_Eakin](https://discourse.cmake.org/user_avatar/discourse.cmake.org/rich_eakin/32/4912_2.png) [@Rich\_Eakin](https://discourse.cmake.org/u/Rich_Eakin)
#### Post date: [September 8, 2024, 9:54pm UTC](https://discourse.cmake.org/t/how-to-find-findpkgconfig-cmake-on-windows/11615/1 "2024-09-08T21:54:11Z")

</div>

Hi,

I’m trying to get a CMakeLists.txt file that works on Linux fine working on Windows using the MSVC toolchain and standalone CMake. My current issue is that `FindPkgConfig.cmake` can’t be found although I see it exists in _"C:\CMake\share\cmake-3.30\Modules"_. Is the standard way to add this folder to the environment’s `PATH` var? _C:\CMake\bin_ is currently the only cmake-related path added there.

The other question I have is, do I need this module for finding packages with a modern verson of CMake? The CMakeLists.txt that I’m working with uses the lines:

```auto
FIND_PACKAGE(PkgConfig REQUIRED)
PKG_CHECK_MODULES(SNDFILE REQUIRED sndfile)

```

although I don’t understand what the benefit is of using `PKG_CHECK_MODULES` over something like `FIND_PACKAGE(SNDFILE)` (other than the package can’t be found if I go with the latter).

Thanks for any help in understanding how this all fits together,  
Rich
