It depends upon whether you're running a constant velocity joint at the transfer case or not. With one, you want the driveshaft and pinion shaft coaxial (in line with each other) at rest. Without one, meaning you have a u-joint at each end, the u-joints have to be clocked relative to each other and the transfer case output shaft's axis should be parallel to the pinion shaft at rest, which makes the included angles between the driveshaft axis and the transfer case output shaft and the angle between the driveshaft axis and the pinion shaft axis equal. It's all relative, so referencing a datum axis in not necessary or helpful.
The reason for these requirements is that u-joints accelerate and decelerate during each revolution (at a constant shaft speed). Hence, the "constant velocity" joint distinction. By setting up drivelines as noted above, you synchronize the acceleration and deceleration as much as possible. If they are out of sync, the drive components have to elastically wind up and unwind during each revolution. This winding and unwinding creates vibration and unnecessary torsional stress in the driveline.
Do a Google image search on the words "driveshaft pinion angle" and you'll see examples of the two proper setups.