# Set CMake\_package\_DIR to use in find\_package()

**URL:** <https://travis-ci.community/t/set-cmake-package-dir-to-use-in-find-package/11277>\
**Category:** Deployment\
**Created:** [March 10, 2021, 10:37am UTC](https://travis-ci.community/t/set-cmake-package-dir-to-use-in-find-package/11277 "2021-03-10T10:37:14Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![kerim371](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/kerim371/32/6282_2.png) [@kerim371](https://travis-ci.community/u/kerim371)\
**Post date:** [March 10, 2021, 10:37am UTC](https://travis-ci.community/t/set-cmake-package-dir-to-use-in-find-package/11277/1 "2021-03-10T10:37:14Z")

</div>

Hi,

I’just started exploring Travis CI.  
To build [my C++ cmake project](https://github.com/Dimspot/h5gt) I need to pass **HDF5\_DIR** to cmake as argument. To install HDF5 I use mamba. How to define the path where `hdf5-config.cmake` file is?

For now my travis status can be found here: [Travis CI - Test and Deploy Your Code with Confidence](https://travis-ci.org/github/Dimspot/h5gt/jobs/762290928)

---

<div class="post-metadata">

**Author:** ![native-api](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/native-api/32/430_2.png) [@native-api](https://travis-ci.community/u/native-api)\
**Post date:** [March 10, 2021, 12:12pm UTC](https://travis-ci.community/t/set-cmake-package-dir-to-use-in-find-package/11277/2 "2021-03-10T12:12:57Z")

</div>

In the linked build, you are installing `libhdf5` and associated packages from Apt. Official Ubuntu Apt packages don’t have either [`HDF5Config.cmake`](https://packages.ubuntu.com/search?searchon=contents&keywords=hdf5-config.cmake&mode=exactfilename&suite=xenial&arch=any) or [`hdf5-config.cmake`](https://packages.ubuntu.com/search?suite=xenial&arch=any&mode=exactfilename&searchon=contents&keywords=hdf5-config.cmake), so if you need them, you need to get the library from somewhere else.

* * *

If you are rather just asking how to pass a parameter to CMake on the command line, it’s via `-D`, see [cmake(1) — CMake 3.20.0-rc3 Documentation](https://cmake.org/cmake/help/latest/manual/cmake.1.html) .

---

<div class="post-metadata">

**Author:** ![kerim371](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/kerim371/32/6282_2.png) [@kerim371](https://travis-ci.community/u/kerim371)\
**Post date:** [March 10, 2021, 12:18pm UTC](https://travis-ci.community/t/set-cmake-package-dir-to-use-in-find-package/11277/3 "2021-03-10T12:18:30Z")

</div>

> [@native-api](#):
>
> In the linked build, you are installing `libhdf5` and associated packages from Apt. Official Ubuntu Apt packages don’t have either [`HDF5Config.cmake`](https://packages.ubuntu.com/search?searchon=contents&keywords=hdf5-config.cmake&mode=exactfilename&suite=xenial&arch=any) or [`hdf5-config.cmake`](https://packages.ubuntu.com/search?suite=xenial&arch=any&mode=exactfilename&searchon=contents&keywords=hdf5-config.cmake), so if you need them, you need to get the library from somewhere else.

thank you for information, I will be more attentif next time.

For my futuretask: does Travis provide some tool to browse directories? Is there a way to see the folder’s tree (maybe somethink like file explorer with GUI or without it)?

---

<div class="post-metadata">

**Author:** ![native-api](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/native-api/32/430_2.png) [@native-api](https://travis-ci.community/u/native-api)\
**Post date:** [March 10, 2021, 12:21pm UTC](https://travis-ci.community/t/set-cmake-package-dir-to-use-in-find-package/11277/4 "2021-03-10T12:21:36Z")

</div>

> [@kerim371](#):
>
> Is there a way to see the folder’s tree?

`ls -R` or any other standard or additionally installed Linux tool.

---

<div class="post-metadata">

**Author:** ![native-api](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/native-api/32/430_2.png) [@native-api](https://travis-ci.community/u/native-api)\
**Post date:** [March 10, 2021, 12:36pm UTC](https://travis-ci.community/t/set-cmake-package-dir-to-use-in-find-package/11277/5 "2021-03-10T12:36:51Z")

</div>

Split this topic on March 10, 2021, 12:36pm UTC

2 posts were split to a new topic: [Control Travis VM via command line](https://travis-ci.community/t/control-travis-vm-via-command-line/11278)
