Specify <lib>-prefix folder destination

Happy New Year! Work less earn much :smiley:

When I build external project using ExternalProject_Add usually I can see three folders:

<lib>     (source folder)
<lib>-build     (build folder)
<lib>-install     (install folder)
<lib>-prefix     (prefix??? folder)

For example for hdf5 lib I have:

HDF5     (source folder)
HDF5-build     (build folder)
HDF5-install     (install folder)
HDF5-prefix     (prefix??? folder)

What parameter controlls where HDF5-prefix will be located?

Usually I have:

ExternalProject_Add(${proj}
  SOURCE_DIR ${EP_SOURCE_DIR}
  BINARY_DIR ${EP_BINARY_DIR}
  INSTALL_DIR ${EP_INSTALL_DIR}
...
)

these specify only src, build and install dirs. How to specify <lib>-prefix dir?

Quoting https://cmake.org/cmake/help/latest/module/ExternalProject.html:

PREFIX <dir>

Root directory for the external project. Unless otherwise noted below, all other directories associated with the external project will be created under here.

and

If no PREFIX , EP_PREFIX , or EP_BASE is specified, then the default is to set PREFIX to <name>-prefix .

1 Like

thank you!