The packages declared in the BasisProject.cmake file should be looked for first before including the Depends.cmake file as this is the standard way to declare dependencies. Additional dependencies that require a more complex conditional statement should go into Depends.cmake. These conditions may depend on the found optional dependencies declared in the BasisProject.cmake file. Hence, change the order of these operations in the basis_find_packages macro.
The packages declared in the BasisProject.cmake file should be looked for first before including the Depends.cmake file as this is the standard way to declare dependencies. Additional dependencies that require a more complex conditional statement should go into Depends.cmake. These conditions may depend on the found optional dependencies declared in the BasisProject.cmake file. Hence, change the order of these operations in the
basis_find_packages
macro.