Re: [PATCH] autodetect path to libdrm

2017-02-05 Thread Andres Rodriguez
, 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)

Re: [PATCH] autodetect path to libdrm

2017-02-05 Thread StDenis, Tom
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

Re: [PATCH] autodetect path to libdrm

2017-02-05 Thread Andres Rodriguez
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

[PATCH] autodetect path to libdrm

2017-02-05 Thread Tom St Denis
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