From afebba132c6d20e5d62e542ef26f6782e2142d59 Mon Sep 17 00:00:00 2001 From: janbar Date: Mon, 28 Oct 2024 20:34:17 +0000 Subject: [PATCH] Fix cmake compilation with dvdcss The commit fixes the following error, trying to link libmythdvdnav. /usr/bin/ld: ../../../../external/libmythdvdnav/libmythdvdnav-35.so.35.0: undefined reference to `dvdcss_open' /usr/bin/ld: ../../../../external/libmythdvdnav/libmythdvdnav-35.so.35.0: undefined reference to `dvdcss_close' /usr/bin/ld: ../../../../external/libmythdvdnav/libmythdvdnav-35.so.35.0: undefined reference to `dvdcss_open_stream' /usr/bin/ld: ../../../../external/libmythdvdnav/libmythdvdnav-35.so.35.0: undefined reference to `dvdcss_read' /usr/bin/ld: ../../../../external/libmythdvdnav/libmythdvdnav-35.so.35.0: undefined reference to `dvdcss_seek' collect2: error: ld returned 1 exit status --- mythtv/external/libmythdvdnav/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mythtv/external/libmythdvdnav/CMakeLists.txt b/mythtv/external/libmythdvdnav/CMakeLists.txt index 5c4b87929aa..bc152c070e8 100644 --- a/mythtv/external/libmythdvdnav/CMakeLists.txt +++ b/mythtv/external/libmythdvdnav/CMakeLists.txt @@ -122,6 +122,9 @@ target_link_libraries(mythdvdnav PUBLIC ${CMAKE_DL_LIBS}) if(APPLE) target_link_libraries(mythdvdnav PRIVATE ${APPLE_CORE_FOUNDATION}) endif() +if(HAVE_DVDCSS_DVDCSS_H) + target_link_libraries(mythdvdnav PRIVATE dvdcss) +endif() # # The MythTV customization to dvdnav adds references to the MythFile* functions,