Open BerengerBerthoul opened 1 year ago
Hi,
Thank you for the report and sorry for the delay.
I created a PR to address the issue if you could take a look. It's similar to the SDL project https://github.com/libsdl-org/SDL/blob/b6ae281e97c4e4680a9010e7e13fe1222c0bcd4b/CMakeLists.txt#L367 though I use a ENABLE variable instead of a DISABLE one. The change keeps compatibility with #59 .
PR #60 added the follwing lines to CMakeLists.txt :
If I include robin-map in my project with FetchContent, like this :
Then add a public dependency :
I now get the following message :
CMake Error: install(EXPORT "myLibTargets" ...) includes target "myLib" which requires target "robin_map" that is not in any export set.
Issue #59 mentionned Catch2 as a way to implement the change in #60 but I think the reason it works in Catch2 is because Catch2 is included as part of the private interface of executables (since it is used to produce unit test executables, not libraries)
Anyway, a way to correct #60 would be to let the user decide whether he wants to install or not. In fmt, they use the FMT_INSTALL option.