This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

#4420 Fix check for XRRNotifyEvent

use CheckTypeSize instead of CheckSymbolExists

From http://www.cmake.org/cmake/help/v3.0/module/CheckSymbolExists.html :
    If the symbol is a type or enum value it will not be recognized
    (consider using CheckTypeSize or CheckCSourceCompiles).
  • Loading branch information...
moben authored and nlyan committed Oct 28, 2014
1 parent e6a3caa commit 5b7392d302a8524a6b9228b46b6f1f2597980118
Showing with 4 additions and 1 deletion.
  1. +4 −1 CMakeLists.txt
View
@@ -205,7 +205,10 @@ if (UNIX)
set(CMAKE_INCLUDE_PATH "${CMAKE_INCLUDE_PATH}:/usr/local/include")
set(XKBlib "X11/Xlib.h;X11/XKBlib.h")
- check_symbol_exists("XRRNotifyEvent" "${XKBlib};X11/extensions/Xrandr.h" HAVE_X11_EXTENSIONS_XRANDR_H)
+ set(CMAKE_EXTRA_INCLUDE_FILES "${XKBlib};X11/extensions/Xrandr.h")
+ check_type_size("XRRNotifyEvent" X11_EXTENSIONS_XRANDR_H)
+ set(HAVE_X11_EXTENSIONS_XRANDR_H "${X11_EXTENSIONS_XRANDR_H}")
+ set(CMAKE_EXTRA_INCLUDE_FILES)
check_include_files("${XKBlib};X11/extensions/dpms.h" HAVE_X11_EXTENSIONS_DPMS_H)
check_include_files("X11/extensions/Xinerama.h" HAVE_X11_EXTENSIONS_XINERAMA_H)

0 comments on commit 5b7392d

Please sign in to comment.