Support install and compilation of tests and examples with HUNTER_ENABLED set to OFF
If a user wants to set HUNTER_ENABLED to OFF to manually install all the dependencies, before this PR it was not possible to either install depthai, or to compile examples and tests.
This PR adds a non-hunter fallback for hunter_private_data and skips all usage of HUNTER_INSTALL_PREFIX if HUNTER_ENABLED is set to OFF, to permit to install depthai and compile examples and tests when HUNTER_ENABLED is set to OFF.
LGTM on quick glance, but changes to CI to run tests without Hunter would have to be added as well
Ok! Let me know if we can help somehow in that. Currently we used the modifications in my recent PRs to build and run depthai-core installing the latest version of the dependencies via conda-forge, beside FP16, libnop and Xlink that are installed explicitly via CMake at the same checkout used by Hunter (https://github.com/luxonis/depthai-core/blob/main/cmake/Hunter/config.cmake), and by setting DEPTHAI_ENABLE_BACKWARD=OFF and DEPTHAI_ENABLE_CURL=OFF, but we plan to do something similar via vcpkg.
Alternatively, we can think of a CI that just reads the file in https://github.com/luxonis/depthai-core/blob/main/cmake/Hunter/config.cmake and installs them via CMake but without hunter.
Ok! Let me know if we can help somehow in that.
That'd be great - just extending the main.workflow.yml with the steps that you have to test this locally
but we plan to do something similar via vcpkg
Would be great to have that in as well!
Alternatively, we can think of a CI that just reads the file in https://github.com/luxonis/depthai-core/blob/main/cmake/Hunter/config.cmake and installs them via CMake but without hunter.
For starters, we could just add it alongside that Hunter config, just duplicating. Later on we might merge, if we were to grant "first class citizenship" to eg vcpkg
Ok! Let me know if we can help somehow in that.
That'd be great - just extending the
main.workflow.ymlwith the steps that you have to test this locally
Ok! In that case, we probably need to wait before for the merge of the rest of the PRs related to HUNTER_ENABLED=OFF as otherwise the CI will fail.
Thanks @traversaro, awesome!
After https://github.com/luxonis/depthai-core/pull/1050 is merged we can add tests and merge.