I have a project where i use 2 different libraries depending on the user interest. While generating, i would like to give the user a choice to select which library to build. So far, i used something like this:
set(BUILD_WITH_IR OFF CACHE BOOL "build ir")
set(BUILD_WITH_TOF OFF CACHE BOOL "build tof")
Problem:
I see 2 checkboxes in CMake GUI to select. I choose one and click configure. CMake resets both the checkboxes to OFF (deselected). Understandably, because both are set to OFF every time CMake configures.
I would like the user be able choose only one option at a time. Based on the user selection, i configure rest of my project.
How can i make these variables mutually exclusive?