forked from antimof/UxPlay
-
Notifications
You must be signed in to change notification settings - Fork 81
/
CMakeLists.txt
70 lines (57 loc) · 1.99 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
if ( APPLE )
cmake_minimum_required( VERSION 3.13 )
else ()
cmake_minimum_required( VERSION 3.5 )
endif ()
project( uxplay )
message( STATUS "Project name: " ${PROJECT_NAME} )
include(GNUInstallDirs)
set ( CMAKE_CXX_STANDARD 11 )
if (ZOOMFIX )
message (STATUS "cmake option ZOOMFIX is no longer used (if needed, ZOOMFIX is automatically applied if X11 libraries are present)" )
endif()
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 )
add_definitions( -DSUPPRESS_AVAHI_COMPAT_WARNING )
else()
set( CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE )
endif()
add_subdirectory( lib/llhttp )
add_subdirectory( lib/playfair )
add_subdirectory( lib )
add_subdirectory( renderers )
if ( GST_MACOS )
add_definitions( -DGST_MACOS )
message ( STATUS "define GST_MACOS" )
endif()
add_executable( uxplay uxplay.cpp )
target_link_libraries( uxplay
renderers
airplay
)
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} )
install( FILES lib/llhttp/LICENSE-MIT DESTINATION ${CMAKE_INSTALL_DOCDIR}/llhttp )
# uninstall target
if(NOT TARGET uninstall)
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
IMMEDIATE @ONLY)
add_custom_target(uninstall
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
endif()