You cannot simply #define USE_FTD2XX
because you also need specific linker options for this to work (i.e. the library to link with). If the option
is OFF
in cmake, the specific link options won't be present in the Makefile
and most likely you'll have linker errors.
So CMake takes care of everything automatically for you, but you need to re-generate your makefiles each time you want to toggle options on/off.
If only headers were involved and no library to link with (like some parts of the Boost framework), then yeah, defining USE_FTD2XX
in your should be enough.