mirror of
https://github.com/morgan9e/UxPlay
synced 2026-04-14 00:04:13 +09:00
CMake adjustments for macOS
This commit is contained in:
@@ -12,18 +12,19 @@ if (ZOOMFIX )
|
||||
message (STATUS "cmake option ZOOMFIX is no longer used (if needed, ZOOMFIX is automatically applied if X11 libraries are present)" )
|
||||
endif()
|
||||
|
||||
|
||||
if ( NOT NO_X11_DEPS )
|
||||
find_package( X11 )
|
||||
if ( X11_FOUND )
|
||||
message (STATUS "Will compile using X11 Libraries (use cmake option -DNO_X11_DEPS=ON if X11 dependence is not wanted)" )
|
||||
link_libraries( ${X11_LIBRARIES} )
|
||||
include_directories( ${X11_INCLUDE_DIR} )
|
||||
else ()
|
||||
message (STATUS "X11 libraries not found, will compile without X11 dependence" )
|
||||
endif ()
|
||||
else()
|
||||
message (STATUS "will compile without X11 dependence" )
|
||||
if ( ( UNIX AND NOT APPLE ) OR USE_X11 )
|
||||
if ( NOT NO_X11_DEPS )
|
||||
find_package( X11 )
|
||||
if ( X11_FOUND )
|
||||
message (STATUS "Will compile using X11 Libraries (use cmake option -DNO_X11_DEPS=ON if X11 dependence is not wanted)" )
|
||||
link_libraries( ${X11_LIBRARIES} )
|
||||
include_directories( ${X11_INCLUDE_DIR} )
|
||||
else ()
|
||||
message (STATUS "X11 libraries not found, will compile without X11 dependence" )
|
||||
endif ()
|
||||
else()
|
||||
message (STATUS "will compile without X11 dependence" )
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if( UNIX AND NOT APPLE )
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
cmake_minimum_required(VERSION 3.4.1)
|
||||
|
||||
set( ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:/usr/local/lib/pkgconfig" ) # standard location for self-installed gstreamer
|
||||
if (APPLE )
|
||||
set( ENV{PKG_CONFIG_PATH} "/Library/FrameWorks/GStreamer.framework/Libraries/pkgconfig" ) # GStreamer.framework, preferred
|
||||
set( ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:/usr/local/lib/pkgconfig" ) # Brew or self-installed gstreamer
|
||||
set( ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:/opt/local/lib/pkgconfig/" ) # MacPorts
|
||||
message( "PKG_CONFIG_PATH (Apple, renderers) = " $ENV{PKG_CONFIG_PATH} )
|
||||
find_program( PKG_CONFIG_EXECUTABLE pkg-config PATHS /Library/FrameWorks/GStreamer.framework/Commands )
|
||||
set(PKG_CONFIG_EXECUTABLE ${PKG_CONFIG_EXECUTABLE} --define-prefix )
|
||||
else()
|
||||
set( ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:/usr/local/lib/pkgconfig" ) # standard location for self-installed gstreamer
|
||||
endif()
|
||||
|
||||
find_package( PkgConfig REQUIRED )
|
||||
|
||||
Reference in New Issue
Block a user