Neargye / magic_enum

Static reflection for enums (to string, from string, iteration) for modern C++, work with any enum type without any macro or boilerplate code
MIT License
4.99k stars 445 forks source link

Only prepend $prefix for relative paths #389

Closed fliiiix closed 1 week ago

fliiiix commented 1 week ago

In cases where CMAKE_INSTALL_LIBDIR is already an absolute path adding a $prefix will be incorrect.

See also issue on nix pkgs: https://github.com/NixOS/nixpkgs/issues/144170 And current workaround: https://github.com/NixOS/nixpkgs/blob/7eee17a8a5868ecf596bbb8c8beb527253ea8f4d/pkgs/development/libraries/magic-enum/default.nix#L21

This should be fully backwards compatible for people that want to have it relocatable.

fliiiix commented 1 week ago

Hm seems the installation test is not happy with this change :crying_cat_face:

fliiiix commented 1 week ago

Not me completely forgetting how bools work and what i want to do :see_no_evil:

Neargye commented 1 week ago

Now all looks good, thanks!