From bdd61ad0cacae04624cbcfccfb3fc8c6429f069e Mon Sep 17 00:00:00 2001 From: "F. Duncanh" Date: Tue, 14 May 2024 21:29:33 -0400 Subject: [PATCH] minor cleanup in lib/CMakeLists.txt (libplist) --- lib/CMakeLists.txt | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index 4dbdd37..ed9fb67 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -80,17 +80,16 @@ else() endif() # libplist +pkg_search_module(PLIST REQUIRED libplist-2.0) +if ( PLIST_FOUND ) + message( STATUS "found libplist-${PLIST_VERSION}" ) +endif() if( APPLE OR WIN32 ) # use static linking - pkg_search_module( PLIST REQUIRED libplist-2.0 ) find_library( LIBPLIST libplist-2.0.a REQUIRED ) message( STATUS "(Static linking) LIBPLIST " ${LIBPLIST} ) target_link_libraries ( airplay ${LIBPLIST} ) else () - pkg_search_module(PLIST libplist>=2.0) - if(NOT PLIST_FOUND) - pkg_search_module(PLIST REQUIRED libplist-2.0) - endif() find_library( LIBPLIST ${PLIST_LIBRARIES} PATH ${PLIST_LIBDIR} ) target_link_libraries ( airplay PUBLIC ${LIBPLIST} ) endif()