aui
aui copied to clipboard
AUI.Boot find multiple packages from one import
It's the case of the gRPC library.
Consider the imported library MyLibrary contains several package configs: MyLibrary-config.cmake for the actual library and MyLibraryHelper-config.cmake for some helper stuff. How can I import both of the configs using AUI.Boot?
New options:
NO_FIND_PACKAGEdisablesfind_packagefunction call insideauib_import
New functions:
auib_find_package(<AUIB_IMPORT_NAME> ...)- wrapsfind_packagetrying to find packages inAUIB_IMPORT_NAMEimported dir.
Example 1:
auib_import(MyLibrary ... NO_FIND_PACKAGE)
auib_find_package(MyLibrary MyLibrary REQUIRED)
auib_find_package(MyLibrary MyLibraryHelper REQUIRED)
Example 2:
auib_import(MyLibrary ...)
auib_find_package(MyLibrary MyLibraryHelper REQUIRED)
However, it would be nice to completely remove the first arg of auib_import.
Pros:
auib_importwill be easier to use- No more guessing what's library's find package name
- Finds automatically all
find_packageconfigs and prints their names - Covers multiple packages case
Cons:
- Legacy
- Need to somehow determine available
find_packageconfig names - Still need
NO_FIND_PACKAGEif we want to import different components of the different packages