# Find\_package - MSVC - Standard Architecture not defined.

**URL:** https://discourse.cmake.org/t/find-package-msvc-standard-architecture-not-defined/15581
**Category:** Development
**Tags:** os:windows, comp:msvc, gen:vs
**Created:** [March 28, 2026, 8:29pm UTC](https://discourse.cmake.org/t/find-package-msvc-standard-architecture-not-defined/15581 "2026-03-28T20:29:36Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Kphillisjr](https://discourse.cmake.org/user_avatar/discourse.cmake.org/kphillisjr/32/6072_2.png) [@Kphillisjr](https://discourse.cmake.org/u/Kphillisjr)
#### Post date: [March 28, 2026, 8:29pm UTC](https://discourse.cmake.org/t/find-package-msvc-standard-architecture-not-defined/15581/1 "2026-03-28T20:29:36Z")

</div>

I am working with a few packages and noticed that the CMAKE find\_package is fundamentally broken with MSVC. From what I can tell the following variables are not defined:

- CMAKE\_LIBRARY\_ARCHITECTURE
- CMAKE\_C\_LIBRARY\_ARCHITECTURE
- CMAKE\_CXX\_LIBRARY\_ARCHITECTURE

What is defined however is the following:

- MSVC\_C\_ARCHITECTURE\_ID (Internal variable)
- MSVC\_CXX\_ARCHITECTURE\_ID (Internal variable)
- CMAKE\_C\_ARCHITECTURE\_ID
- CMAKE\_CXX\_ARCHITECTURE\_ID

I expect the values for the missing variable to match the variables that are already defined.

CMake 3.7 - The documentation for find\_pacakge shows 3 entries for windows that involve “arch”.

CMake 4.3 - The documentation for find\_package still includes 3 entries for windows involving “arch”

Note 1: I noticed this issue with CMAKE v3.31.6 that is included with msvc, and the relevant configuration files (cmake-msvc.cmake, cmake-msvc-c.cmake and cmake-msvc-cxx.cmake) do not appear to be updated with anything that sets the missing variable.

Note 2: fixing this could be useful for searching for packages implementing the common package specification on windows.

---

<div class="post-metadata">

### Author: ![brad.king](https://discourse.cmake.org/user_avatar/discourse.cmake.org/brad.king/32/11_2.png) [@brad.king](https://discourse.cmake.org/u/brad.king)
#### Post date: [March 30, 2026, 8:09pm UTC](https://discourse.cmake.org/t/find-package-msvc-standard-architecture-not-defined/15581/2 "2026-03-30T20:09:39Z")

</div>

For reference, the [`CMAKE_<LANG>_LIBRARY_ARCHITECTURE`](https://cmake.org/cmake/help/v4.3/variable/CMAKE_LANG_LIBRARY_ARCHITECTURE.html) documentation states:

> If the `<LANG>` compiler passes to the linker an architecture-specific system library search directory such as `<prefix>/lib/<arch>` this variable contains the `<arch>` name if/as detected by CMake.

This models the toolchain’s builtin arch-specific library directories, and was created for debian-style multi-arch environments.

MSVC arch-specific library directories have not been considered before AFAIK. I’ve opened [CMake Issue 27731](https://gitlab.kitware.com/cmake/cmake/-/work_items/27731) to propose it.
