(cmake) Fix macro for object libraries dependency settings