From 53ac57dc428ba79d007e786dd4004f8b22a08ded Mon Sep 17 00:00:00 2001 From: "F. Duncanh" Date: Wed, 10 Jul 2024 10:54:27 -0400 Subject: [PATCH] switch from static to dynamic linking of libplist in Windows build --- README.html | 5 ++--- README.md | 1 - README.txt | 9 ++++----- lib/CMakeLists.txt | 5 ++++- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README.html b/README.html index cd745df..44d79a4 100644 --- a/README.html +++ b/README.html @@ -802,9 +802,8 @@ environment (this uses “ninja” in place of install UxPlay dependencies (openssl is already installed with MSYS2):

pacman -S mingw-w64-x86_64-libplist mingw-w64-x86_64-gstreamer mingw-w64-x86_64-gst-plugins-base

-

Note that libplist will be linked statically to the uxplay -executable. If you are trying a different Windows build system, MSVC -versions of GStreamer for Windows are available from the If you are trying a different Windows build system, MSVC versions of +GStreamer for Windows are available from the official GStreamer site, but only the MinGW 64-bit build on MSYS2 has been tested.

diff --git a/README.md b/README.md index f913862..081aa49 100644 --- a/README.md +++ b/README.md @@ -642,7 +642,6 @@ After installing GStreamer, build and install uxplay: open a terminal and change `pacman -S mingw-w64-x86_64-libplist mingw-w64-x86_64-gstreamer mingw-w64-x86_64-gst-plugins-base` - Note that libplist will be linked statically to the uxplay executable. If you are trying a different Windows build system, MSVC versions of GStreamer for Windows are available from the [official GStreamer site](https://gstreamer.freedesktop.org/download/), but only the MinGW 64-bit build on MSYS2 has been tested. diff --git a/README.txt b/README.txt index d464317..7d432e6 100644 --- a/README.txt +++ b/README.txt @@ -805,11 +805,10 @@ downloads, "UxPlay" for "git clone" downloads) and build/install with `pacman -S mingw-w64-x86_64-libplist mingw-w64-x86_64-gstreamer mingw-w64-x86_64-gst-plugins-base` - Note that libplist will be linked statically to the uxplay - executable. If you are trying a different Windows build system, MSVC - versions of GStreamer for Windows are available from the [official - GStreamer site](https://gstreamer.freedesktop.org/download/), but - only the MinGW 64-bit build on MSYS2 has been tested. + If you are trying a different Windows build system, MSVC versions of + GStreamer for Windows are available from the [official GStreamer + site](https://gstreamer.freedesktop.org/download/), but only the + MinGW 64-bit build on MSYS2 has been tested. 5. cd to the UxPlay source directory, then "`mkdir build`" and "`cd build`". The build process assumes that the Bonjour SDK is diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index ed9fb67..7167c94 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -84,11 +84,14 @@ pkg_search_module(PLIST REQUIRED libplist-2.0) if ( PLIST_FOUND ) message( STATUS "found libplist-${PLIST_VERSION}" ) endif() -if( APPLE OR WIN32 ) +if( APPLE ) # use static linking find_library( LIBPLIST libplist-2.0.a REQUIRED ) message( STATUS "(Static linking) LIBPLIST " ${LIBPLIST} ) target_link_libraries ( airplay ${LIBPLIST} ) +elseif( WIN32) + find_library( LIBPLIST ${PLIST_LIBRARIES} PATH ${PLIST_LIBDIR} ) + target_link_libraries ( airplay ${LIBPLIST} ) else () find_library( LIBPLIST ${PLIST_LIBRARIES} PATH ${PLIST_LIBDIR} ) target_link_libraries ( airplay PUBLIC ${LIBPLIST} )