A joint design approach is proposed for the coexistence of MIMO radars and a communication system, for a scenario in which the targets fall in different range bins. Radar transmit precoding and adaptive communication transmission are adopted, and are jointly designed to maximize signal-to-interference-plus-noise ratio (SINR) at the radar receiver subject to the communication system meeting certain rate and power constraints. We start with the design of a system in which knowledge of the target information is used. Such design can be used to benchmark the performance of schemes that do not use target information. Then, we propose a design which does not require target information. In both cases, the optimization problems are nonconvex with respect to the design variables and have high computational complexity. Alternating optimization and sequential convex programming techniques are used to find a local maximum. Based on the analysis of the obtained solution, we propose a reduced dimensionality design, which has reduced complexity without degrading the radar SINR. Simulation results validate the effectiveness of the proposed spectrum sharing framework.