Setting dependency environment in cmake