소스 검색

Print message in summary when a X11 or wayland video driver is not found

huanhuan-jiang 1 년 전
부모
커밋
723c1cc5b3
1개의 변경된 파일8개의 추가작업 그리고 0개의 파일을 삭제
  1. 8 0
      cmake/macros.cmake

+ 8 - 0
cmake/macros.cmake

@@ -393,6 +393,14 @@ function(SDL_PrintSummary)
     message(STATUS "    -DSDL_ARMNEON=OFF")
     message(STATUS "")
   endif()
+
+  if(UNIX AND NOT (ANDROID OR APPLE))
+    if(NOT (HAVE_X11 OR HAVE_WAYLAND))
+      message(STATUS "SDL is being built without a X11 or wayland video driver.")
+      message(STATUS "The library will not be able to create windows on most unix environments.")
+      message(STATUS "")
+    endif()
+  endif()
 endfunction()
 
 function(SDL_install_pdb TARGET DIRECTORY)