From d3d8a37543b1c62de652bd3dd7b8e46fddb36ca8 Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Sat, 10 Jan 2015 23:16:41 +0800 Subject: [PATCH] cmake: use find_package() for XCB --- demos/CMakeLists.txt | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/demos/CMakeLists.txt b/demos/CMakeLists.txt index 582e8f2b..98c611d4 100644 --- a/demos/CMakeLists.txt +++ b/demos/CMakeLists.txt @@ -1,7 +1,5 @@ -pkg_check_modules(XCB REQUIRED xcb) -if (NOT XCB_FOUND) - message(FATAL_ERROR "xcb not found") -endif() +find_package(XCB REQUIRED) + if(NOT EXISTS /usr/include/glm/glm.hpp) message(FATAL_ERROR "Necessary libglm-dev headers cannot be found: sudo apt-get install libglm-dev") endif() @@ -33,7 +31,6 @@ include_directories ( "${PROJECT_SOURCE_DIR}/icd/common" ) -link_directories(${XCB_LIBRARY_DIRS}) link_libraries(${XCB_LIBRARIES} XGL png m) add_executable(xglinfo xglinfo.c) -- 2.34.1