From 159cf39b4d0b4530433757298a1a5ab400d4945b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Sun, 10 Jul 2022 12:07:06 +0200 Subject: [PATCH] CMake: Add lirc library and header detection if pkg-config file does not exist. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Slávek Banko (cherry picked from commit 0dc685b82e3e2733cf3f15c5cb6a6bb9939e93aa) --- ConfigureChecks.cmake | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake index 5a14d7f..4750658 100644 --- a/ConfigureChecks.cmake +++ b/ConfigureChecks.cmake @@ -56,6 +56,18 @@ endif( WITH_LAME ) if( BUILD_LIRC_PLUGIN ) pkg_search_module( LIRC lirc ) + + if( NOT LIRC_FOUND ) + check_library_exists( lirc_client lirc_init "" HAVE_LIRC ) + if( HAVE_LIRC ) + check_include_file( lirc/lirc_client.h HAVE_LIRC_CLIENT_H ) + if( HAVE_LIRC_CLIENT_H ) + set( LIRC_FOUND 1 ) + set( LIRC_LIBRARIES "lirc_client" ) + endif() + endif() + endif( NOT LIRC_FOUND ) + if( NOT LIRC_FOUND ) tde_message_fatal( "lirc support is requested, but was not found on your system" ) endif( NOT LIRC_FOUND )