Open AlwynYin opened 1 year ago
please repost your issue at https://github.com/FDH2/UxPlay
where exactly is openssl on M1 Macs?
will this work? is there anything strange about openssl in homebrew on M1?
(like the usr/local/opt/openssl@3/lib/pkgconfig
location for openssl on Intel macs)?
Edit: it seems to be in /opt/homebrew/opt/openssl (found on web, only have intel mac/homebrew available)
proposed fix:
if( APPLE )
set( ENV{PKG_CONFIG_PATH} "/usr/local/lib/pkgconfig" ) # standard location, and Brew
set( ENV{PKG_CONFIG_PATH} "/opt/homebrew/lib/pkgconfig" ) # Brew on M1 macs
set( ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:/opt/local/lib/pkgconfig/" ) # MacPorts
set( ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:/usr/local/opt/openssl@3/lib/pkgconfig" ) # Brew openssl
set( ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:/opt/hombrew/opt/openssl@3/lib/pkgconfig" ) # M1 Brew openssl
message( "PKG_CONFIG_PATH (Apple, lib) = " $ENV{PKG_CONFIG_PATH} )
find_program( PKG_CONFIG_EXECUTABLE pkg-config PATHS /Library/FrameWorks/GStreamer.framework/Commands )
message( "PKG_CONFIG_EXECUTABLE " ${PKG_CONFIG_EXECUTABLE} )
endif()
Its now updated on the current UxPlay site https://github.com/FDH2/UxPlay
Please test on an M1 mac.
It builds on my M1 mac. Thank you!
With Homebrew arm64, the installation path has been changed to
/opt/homebrew/
instead of/usr/local
but the
openssl
package path inCmakeList.txt
still has the old path hard coded. Changing it to/opt/homebrew
fixes the problem.A possible fix is to use
homebrew --prefix
to find the homebrew prefix inCmakeList.txt
?