We did this when I worked on factorio (on all three desktop platforms, not just linux), it works really well. Side bonus is you can make the inevitably required small tweaks inside the library easily because it's all integrated in the same build system as the rest of your game.