CMakeLists: fix linking
build-generic: fix missing sudo