mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-15 08:54:38 +09:00
Fixed FindXi.cmake
XITouchClass is a define, XITouchClassInfo a struct, that is not properly detected by CMake check_symbol_exists. Ignore this as all recently enough versions support touch.
This commit is contained in:
@@ -29,27 +29,29 @@
|
||||
# limitations under the License.
|
||||
#=============================================================================
|
||||
|
||||
find_package(PkgConfig)
|
||||
|
||||
if(PKG_CONFIG_FOUND)
|
||||
pkg_check_modules(_XI xi)
|
||||
endif (PKG_CONFIG_FOUND)
|
||||
|
||||
include(CheckSymbolExists)
|
||||
|
||||
find_path(XI_INCLUDE_DIR NAMES X11/extensions/XInput2.h
|
||||
PATHS /opt/X11/include
|
||||
DOC "The Xi include directory")
|
||||
PATHS /opt/X11/include
|
||||
${_XI_INCLUDEDIR}
|
||||
${_XI_INCLUDE_DIRS}
|
||||
DOC "The Xi include directory")
|
||||
|
||||
find_library(XI_LIBRARY NAMES Xi
|
||||
PATHS /opt/X11/lib
|
||||
DOC "The Xi library")
|
||||
PATHS /opt/X11/lib
|
||||
${_XI_LIBDIR}
|
||||
${_XI_LIBRARY_DIRS}
|
||||
DOC "The Xi library")
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Xi DEFAULT_MSG XI_LIBRARY XI_INCLUDE_DIR)
|
||||
|
||||
if(XI_FOUND)
|
||||
check_symbol_exists(XITouchClass "${XI_INCLUDE_DIR}/X11/extensions/XInput2.h" HAVE_XI_TOUCH_CLASS)
|
||||
|
||||
if (NOT HAVE_XI_TOUCH_CLASS)
|
||||
set(XI_FOUND 0)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(XI_FOUND)
|
||||
set(XI_LIBRARIES ${XI_LIBRARY})
|
||||
set(XI_INCLUDE_DIRS ${XI_INCLUDE_DIR})
|
||||
|
||||
Reference in New Issue
Block a user