# Config Mode Search Procedure

**URL:** https://discourse.cmake.org/t/config-mode-search-procedure/5340
**Category:** Usage
**Tags:** os:windows
**Created:** [March 31, 2022, 3:57am UTC](https://discourse.cmake.org/t/config-mode-search-procedure/5340 "2022-03-31T03:57:09Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![alice](https://discourse.cmake.org/user_avatar/discourse.cmake.org/alice/32/1615_2.png) [@alice](https://discourse.cmake.org/u/alice)
#### Post date: [March 31, 2022, 3:57am UTC](https://discourse.cmake.org/t/config-mode-search-procedure/5340/1 "2022-03-31T03:57:09Z")

</div>

```auto
fmt
├── release
 │ ├── include
 │ └── lib
                 ├── fmt.lib
                 ├── cmake/fmt
                             ├── fmt-config.cmake

```

command

```auto
cmake -G "Visual Studio 16 2019" ^
		-DCMAKE_BUILD_TYPE=Release ^
		-DSPDLOG_FMT_EXTERNAL=True ^
		-Dfmt_DIR=..\fmt\release\

```

[https://cmake.org/cmake/help/v3.23/command/find\_package.html](https://cmake.org/cmake/help/v3.23/command/find_package.html)

how to define name?

 ![image](https://discourse.cmake.org/uploads/default/original/2X/b/b8bfa22b2ac10c16c4bc14dbdc5a75834ef5bc74.png)

-Dfmt\_DIR=…\fmt\release  
prefix= …fmt  
name=release  
?

If it is, do you have the suggest structure for build release and debud?

I follow the below cmake command and build the structure. It seem to cant effectively use Config Mode Search Procedure

```auto
cmake -G "Visual Studio 16 2019" ^
		-S .\ ^
		-B .\build-release ^
		-DCMAKE_BUILD_TYPE=Release ^
cmake --build build-release --config Release
cmake --install build-release --config Release --prefix ..\release

```

```auto
fmt
├── release
│ ├── include
│ └── lib
                 ├── fmt.lib
                 ├── cmake/fmt
                             ├── fmt-config.cmake
├── debug
│ ├── include
│ └── lib
                 ├── fmt.lib
                 ├── cmake/fmt
                             ├── fmt-config.cmake

```

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)
#### Post date: [March 31, 2022, 2:04pm UTC](https://discourse.cmake.org/t/config-mode-search-procedure/5340/2 "2022-03-31T14:04:12Z")

</div>

`name` is the string given to `find_package` for the name of the package. You can use `--debug-find` to have CMake give more information about its search procedures. As for release and debug builds, usually they differ in just filenames and you can just overlay the installations over each other. However, it seems like `fmt.lib` is the same in both, so you’ll have to have different install prefixes in that case.
