cmake: Link resources statically, and init locally