swri-robotics / marti_common

Common utility functions for MARTI
BSD 3-Clause "New" or "Revised" License
54 stars 63 forks source link

swri_transform_util: try to find PROJ with CMake #649

Closed lopsided98 closed 2 years ago

lopsided98 commented 2 years ago

PROJ provides CMake config files when installed with CMake (rather than autotools, as is done in Debian/Ubuntu). Versions older than 8 (which isn't compatible with swri_transform_util) don't install a pkg-config file when installed with CMake. Therefore, the build currently fails to find PROJ on systems where it is install with CMake to a directory other than /usr.

This patch causes all three methods to be tried in sequence, so should be compatible with all these possibilities. I don't see why using find_library() would ever be necessary, but I kept it to maintain compatibility.

danthony06 commented 2 years ago

Great, thanks!