Move global.h to src/shared/
Fix typo in cmake