# Where can a project install its CMake modules when using CPS

**URL:** https://discourse.cmake.org/t/where-can-a-project-install-its-cmake-modules-when-using-cps/15515
**Category:** Code
**Created:** [February 18, 2026, 6:09pm UTC](https://discourse.cmake.org/t/where-can-a-project-install-its-cmake-modules-when-using-cps/15515 "2026-02-18T18:09:19Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![petk](https://discourse.cmake.org/user_avatar/discourse.cmake.org/petk/32/4555_2.png) [@petk](https://discourse.cmake.org/u/petk)
#### Post date: [February 18, 2026, 6:09pm UTC](https://discourse.cmake.org/t/where-can-a-project-install-its-cmake-modules-when-using-cps/15515/1 "2026-02-18T18:09:19Z")

</div>

This is a follow-up question to [Where can a project install its CMake modules](https://discourse.cmake.org/t/where-can-a-project-install-its-cmake-modules/15304)

To briefly describe the issue again:

Main project provides CMake modules and configuration that extensions (built as separate projects) need to use. When using package config file(s) this works ok I think and projects then need to find the main package and adjust the CMAKE\_MODULE\_PATH to have access to main project’s CMake modules.

What about when a project installs CPS? Where and how could this be then resolved? Is it possible to specify some variable in CPS where CMake modules can be loaded from?

Thank you.

---

<div class="post-metadata">

### Author: ![craig.scott](https://discourse.cmake.org/user_avatar/discourse.cmake.org/craig.scott/32/20_2.png) [@craig.scott](https://discourse.cmake.org/u/craig.scott)
#### Post date: [February 18, 2026, 9:28pm UTC](https://discourse.cmake.org/t/where-can-a-project-install-its-cmake-modules-when-using-cps/15515/2 "2026-02-18T21:28:50Z")

</div>

@Matthew_Woehlke might have opinions on this one.

---

<div class="post-metadata">

### Author: ![Matthew\_Woehlke](https://discourse.cmake.org/user_avatar/discourse.cmake.org/matthew_woehlke/32/2345_2.png) [@Matthew\_Woehlke](https://discourse.cmake.org/u/Matthew_Woehlke)
#### Post date: [February 18, 2026, 9:52pm UTC](https://discourse.cmake.org/t/where-can-a-project-install-its-cmake-modules-when-using-cps/15515/3 "2026-02-18T21:52:30Z")

</div>

> **Where can a project install its CMake modules when using CPS?**

The same place; `<datadir>/cmake/<project>`. It’s still a _CMake_ module, and presumably it isn’t arch-dependent. (If it is, use `<libdir>` instead of `<datadir>`. And, to be fair, you _probably_ won’t get lynched if you just use `<libdir>` whether or not it’s arch-dependent. 🙂)

> **Is it possible to specify some variable in CPS where CMake modules can be loaded from?**

Not presently. It’s a known issue, but will require changes to CMake to solve.
