# Compiling HDF5 with Plugins (LZF)

**URL:** <https://forum.hdfgroup.org/t/compiling-hdf5-with-plugins-lzf/11223>\
**Category:** Uncategorized\
**Created:** [June 22, 2023, 9:18pm UTC](https://forum.hdfgroup.org/t/compiling-hdf5-with-plugins-lzf/11223 "2023-06-22T21:18:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mike.jackson](https://forum.hdfgroup.org/user_avatar/forum.hdfgroup.org/mike.jackson/32/1734_2.png) [@mike.jackson](https://forum.hdfgroup.org/u/mike.jackson)\
**Post date:** [June 22, 2023, 9:18pm UTC](https://forum.hdfgroup.org/t/compiling-hdf5-with-plugins-lzf/11223/1 "2023-06-22T21:18:51Z")

</div>

I’m a bit confused here. Do I compile HDF5 FIRST then the Plugin? Or compile the PLUGIN alongside HDF5?

I’m looking for something in the HDF5 CMake codes to just tell HDF5 “I want these additional filters and this is where the source code is located”.

Thanks  
Mike Jackson

---

<div class="post-metadata">

**Author:** ![byrn](https://forum.hdfgroup.org/letter_avatar_proxy/v4/letter/b/85f322/32.png) [@byrn](https://forum.hdfgroup.org/u/byrn)\
**Post date:** [June 22, 2023, 9:42pm UTC](https://forum.hdfgroup.org/t/compiling-hdf5-with-plugins-lzf/11223/2 "2023-06-22T21:42:38Z")

</div>

Yes you can build the plugins at the same time you build hdf5. I do it with tgz files - I plan to move it to use FetchContent like the compression filters, soon.  
This is how I do it, you may need to do something different. Note that I use the cacheinit.cmake file for all the other settings.

-DHDF5\_ENABLE\_PLUGIN\_SUPPORT:BOOL=ON -DPLUGIN\_TGZ\_NAME:STRING=hdf5\_plugins-master.tar.gz" -DTGZPATH:PATH=${CTEST\_SCRIPT\_DIRECTORY}/temp -DHDF5\_ALLOW\_EXTERNAL\_SUPPORT:STRING="TGZ"
