wpilibsuite / allwpilib

Official Repository of WPILibJ and WPILibC
https://wpilib.org/
Other
1.03k stars 607 forks source link

[build] CMake: Fix find_package(wpilib) calls when some libraries are missing #6784

Closed Gold856 closed 3 days ago

Gold856 commented 4 days ago

Calling find_package(wpilib) often fails when a library like wpilibc is not built and installed. This is because the *_DEP_REPLACE variables filled in wpilib-config.cmake with find_dependency calls to libraries that weren't built. The *_DEP_REPLACE variables have been moved to make it less error-prone by adding a library and setting its variable in the same block.