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.