[12347] Fix Extracting for cmake. Close #27

(based on commit [12243] - a4b3bc5)