src/CMakeLists.txt: some improvements re: library deps, Linux detection