# \`TYPE DOC\` behaviour with and without GNUInstallDirs

**URL:** <https://discourse.cmake.org/t/type-doc-behaviour-with-and-without-gnuinstalldirs/15301>\
**Category:** Code\
**Created:** [November 13, 2025, 5:20am UTC](https://discourse.cmake.org/t/type-doc-behaviour-with-and-without-gnuinstalldirs/15301 "2025-11-13T05:20:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bo98](https://discourse.cmake.org/user_avatar/discourse.cmake.org/bo98/32/5891_2.png) [@Bo98](https://discourse.cmake.org/u/Bo98)\
**Post date:** [November 13, 2025, 5:20am UTC](https://discourse.cmake.org/t/type-doc-behaviour-with-and-without-gnuinstalldirs/15301/1 "2025-11-13T05:20:08Z")

</div>

`install` accepts multiple `TYPE` options, each of which will use `CMAKE_INSTALL_*` variables if available before using the built-in default. Nearly all of the built-in defaults match the defaults offered by `GNUInstallDirs` and I initially (perhaps incorrectly) thought that meant you normally don’t need to even include `GNUInstallDirs` yourself, assuming you aren’t referencing the variables directly. Then I realised about `TYPE DOC`.

This type was quite surprising as it means these install to different places:

```auto
# Installs to share/doc/copyright
install(FILES copyright TYPE DOC)

# Installs to share/doc/<package>/copyright
include(GNUInstallDirs)
install(FILES copyright TYPE DOC)

```

This is all valid and correct as per how documentation is technically written, I just find it surprising it behaves that way espcially since it’s the only type I’m aware of that does this. Is there a backstory behind the different defaults? Is there other catches with skipping `include(GNUInstallDirs)` that I missed?
