fixes on revised CMakeLists.txt files

This commit is contained in:
fduncanh
2021-11-25 00:06:24 -05:00
parent e355394556
commit 156cac57d6
2 changed files with 16 additions and 16 deletions

View File

@@ -25,7 +25,6 @@ add_subdirectory( lib )
add_subdirectory( renderers ) add_subdirectory( renderers )
add_executable( uxplay uxplay.cpp ) add_executable( uxplay uxplay.cpp )
include_directories( uxplay ${GST_INCLUDE_DIRS} )
target_link_libraries( uxplay target_link_libraries( uxplay
renderers renderers
airplay airplay

View File

@@ -24,25 +24,26 @@ add_library( renderers
target_link_libraries ( renderers PUBLIC airplay ) target_link_libraries ( renderers PUBLIC airplay )
# hack to fix cmake confusion due to links in path with macOS FrameWorks # hacks to fix cmake confusion due to links in path with macOS FrameWorks
if( GST_LIBRARY_DIRS MATCHES "/Library/FrameWorks/GStreamer.framework/lib" )
if( GST_INCLUDE_DIRS MATCHES "/Library/FrameWorks/GStreamer.framework/include" )
set( GST_INCLUDE_DIRS "/Library/FrameWorks/GStreamer.framework/Headers") set( GST_INCLUDE_DIRS "/Library/FrameWorks/GStreamer.framework/Headers")
message( "GST_INCLUDE_DIRS" ${GST_INCLUDE_DIRS} ) message( STATUS "GST_INCLUDE_DIRS" ${GST_INCLUDE_DIRS} )
target_include_directories ( renderers PRIVATE ${GST_INCLUDE_DIRS} ) endif()
if( CMAKE_VERSION VERSION_LESS "3.13.5" ) target_include_directories ( renderers PUBLIC ${GST_INCLUDE_DIRS} )
message( FATAL_ERROR "This macOS build needs cmake >= 3.13.5" )
endif() if( GST_LIBRARY_DIRS MATCHES "/Library/FrameWorks/GStreamer.framework/lib" )
set( GST_LIBRARY_DIRS "/Library/FrameWorks/GStreamer.framework/Libraries") set( GST_LIBRARY_DIRS "/Library/FrameWorks/GStreamer.framework/Libraries")
message( "GST_LIBRARY_DIRS" ${GST_LIBRARY_DIRS} ) message( STATUS "GST_LIBRARY_DIRS" ${GST_LIBRARY_DIRS} )
target_link_libraries( renderers PUBLIC ${GST_LIBRARIES} ) target_link_libraries( renderers PUBLIC ${GST_LIBRARIES} )
target_link_directories ( renderers PUBLIC ${GST_LIBRARY_DIRS} ) if( CMAKE_VERSION VERSION_LESS "3.13" )
else() message( FATAL_ERROR "This macOS build needs cmake >= 3.13" )
target_include_directories ( renderers PRIVATE ${GST_INCLUDE_DIRS} )
if( CMAKE_VERSION VERSION_LESS "3.12.4" )
target_link_directories ( renderers PUBLIC ${GST_LIBRARY_DIRS} )
else()
target_link_libraries( renderers PUBLIC ${GST_LINK_LIBRARIES} )
endif() endif()
target_link_directories ( renderers PUBLIC ${GST_LIBRARY_DIRS} )
elseif( CMAKE_VERSION VERSION_LESS "3.12" )
target_link_libraries ( renderers PUBLIC ${GST_LIBRARIES} )
else()
target_link_libraries( renderers PUBLIC ${GST_LINK_LIBRARIES} )
endif() endif()