Merge pull request #4487 from linkmauve/optional-dependencies Add cmake options to disable optional dependencies