A famous result of Lieb establishes that the map (A, B) → tr K * A 1−t KB t is jointly concave in the pair (A, B) of positive definite matrices, where K is a fixed matrix and t ∈ [0, 1]. In this paper we show that Lieb's function admits an explicit semidefinite programming formulation for any rational t ∈ [0, 1]. Our construction makes use of a semidefinite formulation of weighted matrix geometric means. We provide an implementation of our constructions in Matlab.