https://github.com/Kitware/CMake
Raw File
Tip revision: bc4b6aa68dd48ffd567ae7a24abd8911a689c38a authored by Brad King on 02 November 2015, 14:12:44 UTC
CMake 3.4.0-rc3
Tip revision: bc4b6aa
qtwrappingmain.cxx
#include <qapplication.h>
#include "qtwrapping.h"

#ifndef _WIN32
# include <stdlib.h>
# include <stdio.h>
#endif

int main(int argc, char *argv[])
{
#ifndef _WIN32
  const char* display = getenv("DISPLAY");
  if ( display && strlen(display)>0 )
    {
#endif
    QApplication app(argc,argv);

    qtwrapping qtw;
    app.setMainWidget(&qtw);
#ifndef _WIN32
    }
  else
    {
    printf("Environment variable DISPLAY is not set. I will pretend like the test passed, but you should really set it.\n");
    }
#endif

  return 0;
}
back to top