Fix CMake build ordering issue.