Use proper cmake build options
Use proper cmake build options

Require linker dependencies only if executables are built
Fix missing library linking regression introduced in my last PR

truvorskameikin/udp-discovery-cpp,truvorskameikin/udp-discovery-cpp