lcm-proj / lcm

Lightweight Communications and Marshalling
GNU Lesser General Public License v2.1
944 stars 385 forks source link

Fix CMake Glib detection #442

Closed tprk77 closed 1 year ago

tprk77 commented 1 year ago

Restores the original FindGLib2.cmake file with two modifications: First, FOUND_VAR has been removed (it's ignored anyway). Second, I set set(FPHSA_NAME_MISMATCHED TRUE) because find_package_handle_standard_args is called for each component and the mismatched names are expected.

tprk77 commented 1 year ago

Yes, to be fair I think it's a minor improvement, mostly that you only need to target_link_libraries and not have to do target_include_directories. I am not really a CMake expert, but I think this is more the "CMake way" of doing it. @mwoehlke-kitware was the person who originally did this work, and he's a CMake expert, so I would defer to him, but he's seemingly not involved with LCM anymore.