https://github.com/Kitware/CMake
Raw File
Tip revision: 51b34a5483dccc20edf6a3cc65f3bb19b31b1d72 authored by Brad King on 20 September 2023, 14:33:04 UTC
CMake 3.27.6
Tip revision: 51b34a5
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