Nominate a point within the war machine's line of sight and that is not outside the cannon's maximum range.
Your target does not have to be an enemy model; it can be a point on the ground if you wish. Remember that war machines are allowed to pivot in the Shooting phase, the better to bring your chosen target into the weapon's line of sight.
When choosing your target point, it's best to bear in mind that, unless something goes wrong, the cannonball will always overshoot by between 2" and 10", so you'd be well served to aim a few inches short of the enemy you wish to hit.
Note that you are not allowed to make a cannon shot in such a way that it has a chance of hitting a friendly unit or an enemy unit that is engaged in close combat.
When you have chosen your target, place a small coin or counter in the correct position as a reminder of where the shot is intended to land.