Another attempt at fixing cmake dependency problem