find_package(HINTS) for dependencies
ahundt opened this issue · 2 comments
Is there a way to supply directory hints?
The following works:
find_package(CAMODOCAL REQUIRED HINTS /usr/local/lib/cmake/CAMODOCAL)
But I'd prefer to keep using basis_project()
.
I read through basis_project() and didn't see anything there.
No, that's not possible. At the time, these "CONFIG" mode options of find_package
didn't exist, hence they are not part of basis_find_package
either. Instead, you would have all this in the Find modules (i.e., "MODULE" mode). That is what you can still do, place a Find<Package>.cmake
file in the config/
directory (CONFIG_DIR
) which then calls find_package
in CONFIG mode.
Moreover, having all these options as part of basis_project
would make this more complex and further is not really related to the meta-data about the project itself. How to find the dependencies should be dealt with elsewhere. Such as a custom Find module or in the config/Depends.cmake
file.
Okay that is a functional workaround, thanks. Do you think there is any value of tracking new functionality added to the cmake APIs like the additional config mode options?
There are definitely trade offs but likely it may make sense to have some timeline for such updates, even if that is a very long one.