cmake: use cmake_dependent_option
Then the options are always right. Previously, the options could be wrong because, e.g., VTK support was turned off, but the discrete session was not.
Then the options are always right. Previously, the options could be wrong because, e.g., VTK support was turned off, but the discrete session was not.