flatbuffers icon indicating copy to clipboard operation
flatbuffers copied to clipboard

CMake FindFlatBuffers.cmake vs FlatbuffersConfig.cmake

Open clanghans opened this issue 3 years ago • 1 comments

Hi all,

I have noticed an inconsistency in the CMake handling around the find_package mechanism.

If I use the FindFlatBuffers.cmake file I need to include it like this: find_package(FlatBuffers) and if I want to use the config mode of the find_package mechanism I need to do find_package(Flatbuffers CONFIG).

According to the CMake find_package documentation the typical lookup is for <lowercasePackageName>-config.cmake or <PackageName>Config.cmake

Noticed the same with the generated FlatbuffersTargets.cmake.

I have already made the changes and would be happy to provide a PR if we agree that this needs to be changed.

clanghans avatar May 24 '22 08:05 clanghans

Sure, PRs are welcome

dbaileychess avatar Jun 14 '22 23:06 dbaileychess