, 2017 16:26
*To:* Tom St Denis; amd-gfx@lists.freedesktop.org
*Cc:* StDenis, Tom
*Subject:* Re: [PATCH] autodetect path to libdrm
Hey Tom,
Overall in cmake calling pkg_check_modules() directly is usually not a
good practice. The common approach is to have a file in
cmake/modules/Find$(name)
ested instead.
Tom
From: Andres Rodriguez
Sent: Sunday, February 5, 2017 16:26
To: Tom St Denis; amd-gfx@lists.freedesktop.org
Cc: StDenis, Tom
Subject: Re: [PATCH] autodetect path to libdrm
Hey Tom,
Overall in cmake calling pkg_check_modules() directly is usually not
Hey Tom,
Overall in cmake calling pkg_check_modules() directly is usually not a
good practice. The common approach is to have a file in
cmake/modules/Find$(name).cmake that takes care of everything.
For example, you could use this FindLibdrm.cmake from the KDE project:
https://github.com/KDE/kwi
Signed-off-by: Tom St Denis
---
CMakeLists.txt | 4 +++-
src/lib/query_drm.c | 4 ++--
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index bef94fdba788..d2f393f0fa9b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -25,6 +25,8 @@ include_di