Fix apple build.

The apple build was broken because the elseif in the CMakeLists is never triggered.

Some code was not properly adapted for the new qtmacgoodies.

Some paths were not adapted to new split.
I had a quick look and thought this was merged in the official repository, am I wrong?