cmake: add options for building gui

Closes #34190.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>