From 26ec21f50e15fb31aaee2b953c14c5273f543f9f Mon Sep 17 00:00:00 2001 From: fduncanh Date: Tue, 21 Sep 2021 04:37:25 -0400 Subject: [PATCH] fixes to CMakeLists.txt for MacOS builds --- README.md | 7 +++++-- lib/CMakeLists.txt | 12 ++++++------ renderers/CMakeLists.txt | 5 +++++ 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 2d27642..2c16724 100644 --- a/README.md +++ b/README.md @@ -62,7 +62,10 @@ avahi-compat-mDNSResponder-devel (+ libX11-devel for ZOOMFIX). The required GStreamer packages are: gstreamer-devel gstreamer-plugins-base-devel gstreamer-plugins-libav gstreamer-plugins-bad (+ gstreamer-plugins-vaapi for Intel graphics). -**MacOS** (Currently only for Intel X86_64 Macs): +**MacOS** (Intel X86_64 Macs only): + +_Note: A native AirPlay Server feature is included in upcoming MacOS 12 Monterey, +but UxPlay can run on older MacOS systems that will not be able to run Monterey._ These instructions for MacOS asssume that the Xcode command-line developer tools are installed (if Xcode is installed, open the Terminal, type "sudo xcode-select --install" and accept the conditions). @@ -248,7 +251,7 @@ if it is still open when the GStreamer pipeline is closed._ # ChangeLog 1.35 2021-09-10 now uses a GLib MainLoop, and builds on MacOS (tested on Intel Mac, 10.15 ). - New option -t _timeout_ for relauching server if no connections were active in + New option -t _timeout_ for relaunching server if no connections were active in previous _timeout_ seconds (to renew Bonjour registration). 1.341 2021-09-04 fixed: render logger was not being destroyed by stop_server() diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index dde2de1..9d79975 100755 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -52,15 +52,15 @@ elseif( APPLE ) message( "OPENSSL_LIBRARY_DIRS " ${OPENSSL_LIBRARY_DIRS} ) message( "OPENSSL_INCLUDE_DIRS " ${OPENSSL_INCLUDE_DIRS} ) find_library( LIBCRYPTO libcrypto.a PATHS ${OPENSSL_LIBRARY_DIRS} REQUIRED ) - find_library( LIBZ libz.a) # needed by MacPorts openssl message( "LIBCRYPTO " ${LIBCRYPTO} ) + target_link_libraries( airplay ${LIBCRYPTO} ) + if( LIBCRYPTO MATCHES "/opt/local/lib/libcrypto.a" ) #MacPorts openssl + find_library( LIBZ libz.a) # needed by MacPorts openssl + message("(MacPorts) LIBZ= " ${LIBZ} ) + target_link_libraries( airplay ${LIBZ} ) + endif() target_include_directories( airplay PRIVATE ${OPENSSL_INCLUDE_DIRS} ) - - target_link_libraries( airplay - ${LIBCRYPTO} - ${LIBZ} - ) endif() diff --git a/renderers/CMakeLists.txt b/renderers/CMakeLists.txt index f794563..a09ff2c 100644 --- a/renderers/CMakeLists.txt +++ b/renderers/CMakeLists.txt @@ -17,6 +17,11 @@ pkg_check_modules(GST REQUIRED gstreamer-1.0>=1.4 gstreamer-app-1.0>=1.4 ) message( "GST_LIBRARIES" ${GST_LIBRARIES} ) +# hack to fix cmake confusion due to links in path +if( GST_LIBRARY_DIRS MATCHES "/Library/FrameWorks/GStreamer.framework/lib" ) + set( GST_LIBRARY_DIRS "/Library/FrameWorks/GStreamer.framework/Libraries") +endif() + message( "GST_LIBRARY_DIRS " ${GST_LIBRARY_DIRS} ) message( "GST_CFLAGS " ${GST_CFLAGS} ) message( "GST_LDFLAGS " ${GST_LDFLAGS} )