This work presents a method of exactly and efficiently evaluating integrals of compactly supported (and otherwise) polynomial radial kernels near piecewise-planar boundaries. The technique is motivated by and has an immediate application in the smoothed-particle hydrodynamics method employing the semi-analytical boundary formulation. The current implementation is exact and fully general, avoiding any need for symbolic or numerical integration which previous implementations rely on. A detailed derivation and three compact implementations are provided and the latter can be easily modified to fit new and existing simulation codes. Applications and good performance are demonstrated on a number of test problems, where the semi-analytical boundary method can simulate complex boundaries using roughly half the boundary particles required in a ghost particle boundary method.