# Windows Cmake Debug And Release Builds?

**URL:** <https://discourse.glfw.org/t/windows-cmake-debug-and-release-builds/879>\
**Category:** support\
**Created:** [March 17, 2017, 10:37pm UTC](https://discourse.glfw.org/t/windows-cmake-debug-and-release-builds/879 "2017-03-17T22:37:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![larryl](https://avatars.discourse-cdn.com/v4/letter/l/e9bcb4/32.png) [@larryl](https://discourse.glfw.org/u/larryl)\
**Post date:** [March 17, 2017, 10:37pm UTC](https://discourse.glfw.org/t/windows-cmake-debug-and-release-builds/879/1 "2017-03-17T22:37:09Z")

</div>

Hi Folks:

Cmake for Windows produces one .lib file, under the debug directory.

Is this in fact a debug version of GLFW’s library?

Can an optimized .lib file be generated?

```
  Thanks
  Larry
```

---

<div class="post-metadata">

**Author:** ![mmozeiko](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.glfw.org/mmozeiko/32/29_2.png) [@mmozeiko](https://discourse.glfw.org/u/mmozeiko)\
**Post date:** [March 17, 2017, 11:46pm UTC](https://discourse.glfw.org/t/windows-cmake-debug-and-release-builds/879/2 "2017-03-17T23:46:33Z")

</div>

If you use Visual Studio generator and build with IDE, then you can simply choose configuration in IDE.

If you use msbuild to compile generated .sln file then you can use `/p:Configuration=Release` argument to specify which configuration to compile.

If you use CMake to build generated sln file, then you can simply do run pass `--config Release` argument to cmake.exe.

if you use different generator than Visual Studio, then pass `-DCMAKE_CONFIGURATION_TYPES="Release"` argument to cmake.exe.

---

<div class="post-metadata">

**Author:** ![larryl](https://avatars.discourse-cdn.com/v4/letter/l/e9bcb4/32.png) [@larryl](https://discourse.glfw.org/u/larryl)\
**Post date:** [March 18, 2017, 1:23am UTC](https://discourse.glfw.org/t/windows-cmake-debug-and-release-builds/879/3 "2017-03-18T01:23:44Z")

</div>

Thanks mmozeiko:

That worked.

I’m new to Cmake.
