summaryrefslogtreecommitdiffstats
path: root/project/cmake/modules/FindShairplay.cmake
diff options
context:
space:
mode:
authormanuel <manuel@mausz.at>2017-06-04 16:57:49 +0200
committermanuel <manuel@mausz.at>2017-06-04 16:57:49 +0200
commitf44ecaa4f27e7538ddcad66d40e543bffa2d2d86 (patch)
treed8de60fc7e17edeb6f0921726c038ee54b281445 /project/cmake/modules/FindShairplay.cmake
parentae08c8b7221bc965ac40d70e53fc8fcddb050c46 (diff)
downloadkodi-pvr-build-f44ecaa4f27e7538ddcad66d40e543bffa2d2d86.tar.gz
kodi-pvr-build-f44ecaa4f27e7538ddcad66d40e543bffa2d2d86.tar.bz2
kodi-pvr-build-f44ecaa4f27e7538ddcad66d40e543bffa2d2d86.zip
sync with upstream
Diffstat (limited to 'project/cmake/modules/FindShairplay.cmake')
-rw-r--r--project/cmake/modules/FindShairplay.cmake63
1 files changed, 0 insertions, 63 deletions
diff --git a/project/cmake/modules/FindShairplay.cmake b/project/cmake/modules/FindShairplay.cmake
deleted file mode 100644
index 87d3107..0000000
--- a/project/cmake/modules/FindShairplay.cmake
+++ /dev/null
@@ -1,63 +0,0 @@
1#.rst:
2# FindShairplay
3# -------------
4# Finds the Shairplay library
5#
6# This will will define the following variables::
7#
8# SHAIRPLAY_FOUND - system has Shairplay
9# SHAIRPLAY_INCLUDE_DIRS - the Shairplay include directory
10# SHAIRPLAY_LIBRARIES - the Shairplay libraries
11# SHAIRPLAY_DEFINITIONS - the Shairplay compile definitions
12#
13# and the following imported targets::
14#
15# Shairplay::Shairplay - The Shairplay library
16
17find_path(SHAIRPLAY_INCLUDE_DIR shairplay/raop.h)
18
19include(FindPackageHandleStandardArgs)
20if(NOT WIN32)
21 find_library(SHAIRPLAY_LIBRARY NAMES shairplay)
22
23 if(SHAIRPLAY_INCLUDE_DIR AND SHAIRPLAY_LIBRARY)
24 include(CheckCSourceCompiles)
25 set(CMAKE_REQUIRED_INCLUDES ${SHAIRPLAY_INCLUDE_DIRS})
26 set(CMAKE_REQUIRED_LIBRARIES ${SHAIRPLAY_LIBRARIES})
27 check_c_source_compiles("#include <shairplay/raop.h>
28
29 int main()
30 {
31 struct raop_callbacks_s foo;
32 foo.cls;
33 return 0;
34 }
35 " HAVE_SHAIRPLAY_CALLBACK_CLS)
36 endif()
37
38 find_package_handle_standard_args(Shairplay
39 REQUIRED_VARS SHAIRPLAY_LIBRARY SHAIRPLAY_INCLUDE_DIR HAVE_SHAIRPLAY_CALLBACK_CLS)
40else()
41 # Dynamically loaded DLL
42 find_package_handle_standard_args(Shairplay
43 REQUIRED_VARS SHAIRPLAY_INCLUDE_DIR)
44endif()
45
46if(SHAIRPLAY_FOUND)
47 set(SHAIRPLAY_LIBRARIES ${SHAIRPLAY_LIBRARY})
48 set(SHAIRPLAY_INCLUDE_DIRS ${SHAIRPLAY_INCLUDE_DIR})
49 set(SHAIRPLAY_DEFINITIONS -DHAVE_LIBSHAIRPLAY=1)
50
51 if(NOT TARGET Shairplay::Shairplay)
52 add_library(Shairplay::Shairplay UNKNOWN IMPORTED)
53 if(SHAIRPLAY_LIBRARY)
54 set_target_properties(Shairplay::Shairplay PROPERTIES
55 IMPORTED_LOCATION "${SHAIRPLAY_LIBRARY}")
56 endif()
57 set_target_properties(Shairplay::Shairplay PROPERTIES
58 INTERFACE_INCLUDE_DIRECTORIES "${SHAIRPLAY_INCLUDE_DIR}"
59 INTERFACE_COMPILE_DEFINITIONS HAVE_LIBSHAIRPLAY=1)
60 endif()
61endif()
62
63mark_as_advanced(SHAIRPLAY_INCLUDE_DIR SHAIRPLAY_LIBRARY)