fix cmakelist for macosx build

Merged jehan requested to merge fix/macosbuild into bc

Merge request reports