mirror of
https://github.com/morgan9e/UxPlay
synced 2026-04-14 16:24:29 +09:00
reworked (simplified) CmakeLists.txt, lib/CMakeLists.txt (thanks @swills )
This commit is contained in:
@@ -19,6 +19,16 @@ if( UNIX AND NOT APPLE )
|
||||
add_definitions( -DSUPPRESS_AVAHI_COMPAT_WARNING )
|
||||
endif()
|
||||
|
||||
|
||||
if( UNIX AND NOT APPLE )
|
||||
find_package(PkgConfig REQUIRED)
|
||||
pkg_check_modules(DNSSD REQUIRED avahi-compat-libdns_sd)
|
||||
pkg_check_modules(PLIST libplist>=2.0)
|
||||
if(NOT PLIST_FOUND)
|
||||
pkg_check_modules(PLIST REQUIRED libplist-2.0)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
add_subdirectory( lib/llhttp )
|
||||
add_subdirectory( lib/playfair )
|
||||
add_subdirectory( lib )
|
||||
@@ -30,30 +40,31 @@ if( UNIX AND NOT APPLE )
|
||||
include_directories( uxplay ${GST_INCLUDE_DIRS} )
|
||||
else()
|
||||
include_directories( uxplay
|
||||
/Library/FrameWorks/GStreamer.framework/Headers/
|
||||
/usr/local/include
|
||||
/usr/local/include/glib-2.0
|
||||
/usr/local/lib/glib-2.0/include
|
||||
/opt/local/include
|
||||
/opt/local/include/glib-2.0
|
||||
/opt/local/lib/glib-2.0/include
|
||||
)
|
||||
/Library/FrameWorks/GStreamer.framework/Headers/
|
||||
/usr/local/include
|
||||
/usr/local/include/glib-2.0
|
||||
/usr/local/lib/glib-2.0/include
|
||||
/opt/local/include
|
||||
/opt/local/include/glib-2.0
|
||||
/opt/local/lib/glib-2.0/include
|
||||
)
|
||||
endif()
|
||||
|
||||
if (BSD )
|
||||
target_link_directories( uxplay PUBLIC
|
||||
${GST_LIBRARY_DIRS}
|
||||
${PLIST_LIBRARY_DIRS}
|
||||
${DNSSD_LIBRARY_DIRS}
|
||||
)
|
||||
target_link_libraries( uxplay ${PLIST_LIBRARIES} )
|
||||
endif()
|
||||
|
||||
target_link_libraries( uxplay
|
||||
renderers
|
||||
airplay
|
||||
)
|
||||
|
||||
if ( UNIX AND NOT APPLE )
|
||||
target_link_directories( uxplay PUBLIC
|
||||
${GST_LIBRARY_DIRS}
|
||||
${DNSSD_LIBRARY_DIRS}
|
||||
${PLIST_LIBRARY_DIRS}
|
||||
)
|
||||
target_link_libraries( uxplay ${PLIST_LIBRARIES} )
|
||||
endif()
|
||||
|
||||
|
||||
install( TARGETS uxplay RUNTIME DESTINATION bin )
|
||||
install( FILES uxplay.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1 )
|
||||
install( FILES README.md README.txt README.html LICENSE DESTINATION ${CMAKE_INSTALL_DOCDIR} )
|
||||
|
||||
Reference in New Issue
Block a user