fixed rescoures management in cmakefiles