# FindProtobuf output directory undocumented

**URL:** https://discourse.cmake.org/t/findprotobuf-output-directory-undocumented/2880
**Category:** Development
**Created:** [March 3, 2021, 9:27am UTC](https://discourse.cmake.org/t/findprotobuf-output-directory-undocumented/2880 "2021-03-03T09:27:38Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Ottmar\_Zittlau](https://discourse.cmake.org/user_avatar/discourse.cmake.org/ottmar_zittlau/32/1259_2.png) [@Ottmar\_Zittlau](https://discourse.cmake.org/u/Ottmar_Zittlau)
#### Post date: [March 3, 2021, 9:27am UTC](https://discourse.cmake.org/t/findprotobuf-output-directory-undocumented/2880/1 "2021-03-03T09:27:38Z")

</div>

Hi,

I would like to export my protobuf-files into a separate directory. After reading through the FindProtobuf.cmake I found out, that there is an option PROTOC\_OUT of generate\_protobuf\_cpp that does exactly that, but seems to be undocumented. As this option exists since at least v3.16 (that I use), I’m wondering why it is not documented? If it simply has been forgotten, I would try and change the documentation myself (and probably add functionality to create this folder if it doesn’t exist).

Thanks and best regards  
oz

---

<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 3, 2021, 6:07pm UTC](https://discourse.cmake.org/t/findprotobuf-output-directory-undocumented/2880/2 "2021-03-03T18:07:39Z")

</div>

I presume you are talking about `PROTOC_OUT_DIR`? It looks like it came in at 3.13 by copying upstream’s implementation. It seems that upstream has no documentation. Adding that locally sounds reasonable to me.

Since it has some lineage with upstream, checking that things there work as expected would be useful too (e.g., if the directory needs to be made).

---

<div class="post-metadata">

### Author: ![Ottmar\_Zittlau](https://discourse.cmake.org/user_avatar/discourse.cmake.org/ottmar_zittlau/32/1259_2.png) [@Ottmar\_Zittlau](https://discourse.cmake.org/u/Ottmar_Zittlau)
#### Post date: [March 5, 2021, 11:16am UTC](https://discourse.cmake.org/t/findprotobuf-output-directory-undocumented/2880/3 "2021-03-05T11:16:32Z")

</div>

Yes, exactly, that is the option I was referring to.  
What do you mean by upstream? Google’s own cmake implementation?

---

<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 5, 2021, 2:06pm UTC](https://discourse.cmake.org/t/findprotobuf-output-directory-undocumented/2880/4 "2021-03-05T14:06:52Z")

</div>

Yes, upstream is Protobuf’s own repository. When I looked, it seems that upstream changed again, so maybe we’re left on a fork of the code at this point. If that’s the case, I think just adding docs in CMake is sufficient.
