Make library type a cache option