https://github.com/Kitware/CMake
Raw File
Tip revision: 1b4482f65dd41f21ec8abc0777b8dc1f0381bbd6 authored by Brad King on 26 November 2019, 14:18:07 UTC
CMake 3.16.0
Tip revision: 1b4482f
X11.c
#include "stdio.h"
#ifdef CMAKE_HAS_X

#  include <X11/Xlib.h>
#  include <X11/Xutil.h>

int main()
{
  printf("There is X on this computer\n");
  return 0;
}

#else

int main()
{
  printf("No X on this computer\n");
  return 0;
}

#endif
back to top