minor cleanup in lib/CMakeLists.txt (libplist)

This commit is contained in:
F. Duncanh
2024-05-14 21:29:33 -04:00
parent f0407d780e
commit bdd61ad0ca

View File

@@ -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()