cmake: Check directory properties only when related option is active
cmake: Check directory properties only when related option is active

TheImagingSource/tiscamera,TheImagingSource/tiscamera,TheImagingSource/tiscamera,TheImagingSource/tiscamera