I've got an application that uses PCI devices from PEAK systems. Earlier I was using socketCAN to read and write CAN messages. Recently, I added a feature to accommodate the pcan driver as well. Currently, I'm using,
Code: Select all
option(CAN_DRIVER "CAN driver option" sockcan)
option toCAN_DRIVER
during CMake execution to use pcan linker for building appropriate libraries that will be linked to my application.pcan
I'm thinking of getting rid of this compile-time option such a way that the CMake can use pcan driver whenever available else socket CAN is used. I would be happy if someone could let me whether there are some environmental variables or CMake macro that can be used to detect the presence of a pcan driver?
Regards,