From 4868063773d5251e5cd7ca72b996df53c2ee18ee Mon Sep 17 00:00:00 2001 From: kichikuou Date: Sat, 27 Jul 2019 11:34:49 +0900 Subject: [PATCH] Rely on cmake's FindX11 to find Xxf86vm --- CMakeLists.txt | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8e74a89..511c0ca 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -52,11 +52,15 @@ else() optional_find_package(GTK2 COMPONENTS gtk) optional_find_package(Freetype) include(FindPkgConfig) + if (X11_xf86vmode_FOUND) + set(HAVE_XF86VMODE 1) + endif() if (NOT X11_FOUND) optional_pkg_check_modules(SDL2 sdl2) endif() optional_pkg_check_modules(SDL2MIXER SDL2_mixer) + include_directories( ${ZLIB_INCLUDE_DIRS} ${FREETYPE_INCLUDE_DIRS} @@ -69,6 +73,7 @@ else() ${ZLIB_LIBRARIES} ${FREETYPE_LIBRARIES} ${X11_LIBRARIES} + ${X11_Xxf86vm_LIB} ${GTK2_LIBRARIES} ${SDL2_LIBRARIES} ${SDL2MIXER_LIBRARIES} @@ -220,15 +225,6 @@ if (NOT SRC_FONT) message(FATAL_ERROR "*** No font device available ***") endif() -# XFree86extensions - -if (X11_FOUND) - check_library_exists(Xxf86vm XF86VidModeQueryExtension "" HAVE_XF86VMODE) - if (HAVE_XF86VMODE) - link_libraries(Xxf86vm) - endif() -endif() - # TODO: MMX function (print_summary name)