more cleanups of CMakeLists.txt

This commit is contained in:
fduncanh
2021-11-24 21:35:55 -05:00
parent f412d208ca
commit e355394556
3 changed files with 55 additions and 85 deletions

View File

@@ -19,50 +19,18 @@ if( UNIX AND NOT APPLE )
add_definitions( -DSUPPRESS_AVAHI_COMPAT_WARNING )
endif()
if( UNIX AND NOT APPLE )
find_package(PkgConfig REQUIRED)
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 )
add_subdirectory( renderers )
add_executable( uxplay uxplay.cpp )
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
)
endif()
include_directories( uxplay ${GST_INCLUDE_DIRS} )
target_link_libraries( uxplay
renderers
airplay
)
if ( UNIX AND NOT APPLE )
target_link_directories( uxplay PUBLIC
${GST_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} )