diff options
author | Simon Tatham <anakin@pobox.com> | 2022-09-19 22:21:01 +0300 |
---|---|---|
committer | Simon Tatham <anakin@pobox.com> | 2022-09-19 22:21:01 +0300 |
commit | 9fcfd679b49a015e95f70b3f0380243e0db8b035 (patch) | |
tree | 9362b109643a8c5edb32fb55d6d9ac05b0d8a90a | |
parent | 864b4c27fa67a95b2daa095923878bdba9fc6fcf (diff) |
Stop trying to include X11 headers in non-GTK builds.
In commit 732ec31a17a7fea I made the check for libX11 conditional on
GTK - but I forgot that if we're building without GTK, I should
_define_ NOT_X_WINDOWS, rather than leaving it undefined. As a result,
the build would fail on files like unix/utils/x11_ignore_error.c.
-rw-r--r-- | cmake/platforms/unix.cmake | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/cmake/platforms/unix.cmake b/cmake/platforms/unix.cmake index 98474485..4d056d0a 100644 --- a/cmake/platforms/unix.cmake +++ b/cmake/platforms/unix.cmake @@ -96,6 +96,10 @@ if(GTK_FOUND) endif() endfunction() check_x11() +else() + # If we didn't even have GTK, behave as if X11 is not available. + # (There's nothing useful we could do with it even if there was.) + set(NOT_X_WINDOWS ON) endif() include_directories(${CMAKE_SOURCE_DIR}/charset ${GTK_INCLUDE_DIRS} ${X11_INCLUDE_DIR}) |