A Green-function theory for the dynamic spin susceptibility in the square-lattice spin-1/2 antiferromagnetic compass-Heisenberg model employing a generalized mean-field approximation is presented. The theory describes magnetic long-range order (LRO) and short-range order (SRO) at arbitrary temperatures. The magnetization, Neel temperature T_N, specific heat, and uniform static spin susceptibility $chi$ are calculated self-consistently. As the main result, we obtain LRO at finite temperatures in two dimensions, where the dependence of T_N on the compass-model interaction is studied. We find that T_N is close to the experimental value for Ba2IrO4. The effects of SRO are discussed in relation to the temperature dependence of $chi$.