Correct build of WxWidgets

WxWidgets must be built during or before cmake-time as we rely on the
output of WxWidgets to set some CPP macros and linker flags.