When you want to introduce a new dependency through CMake, you need to ensure that you have configured the environment variables for the dependency.
The find_mackage
command retrieves these files by searching for environment variables. You need to find the directory where these files are located in the dependencies and add them to the system's environment variables.
If you don't want it to pollute your environment variables, you can also set CMAKE_MODULE_PATH
to tell CMake where these files are:
set(CMAKE_MODULE_PATH "path/to/Eigen3Config.cmake") # May be "path/to/eigen3-config.cmake"
CMake does not support automatic downloading of dependencies from the Internet, so you need to download dependencies to your computer in advance before introducing them.