In this case, it is best to design a pool inside the building itself or not far from it with a closed structure.
The approximation of the pool to the house is argued by the technical side of the question: heating equipment, cleaning systems and pumping units should be located nearby, in special technical rooms.