summaryrefslogtreecommitdiffstats
path: root/cmake/modules/FindShairplay.cmake
diff options
context:
space:
mode:
authormanuel <manuel@mausz.at>2020-07-02 23:09:26 +0200
committermanuel <manuel@mausz.at>2020-07-02 23:09:26 +0200
commit5f8335c1e49ce108ef3481863833c98efa00411b (patch)
treef02b5c1c9765bb6a14c8eb42bb4f81b9face0b55 /cmake/modules/FindShairplay.cmake
parente317daf081a1048904fdf0b548946fa3ba6593a7 (diff)
downloadkodi-pvr-build-5f8335c1e49ce108ef3481863833c98efa00411b.tar.gz
kodi-pvr-build-5f8335c1e49ce108ef3481863833c98efa00411b.tar.bz2
kodi-pvr-build-5f8335c1e49ce108ef3481863833c98efa00411b.zip
sync with upstreamHEADmaster
Diffstat (limited to 'cmake/modules/FindShairplay.cmake')
-rw-r--r--cmake/modules/FindShairplay.cmake42
1 files changed, 18 insertions, 24 deletions
diff --git a/cmake/modules/FindShairplay.cmake b/cmake/modules/FindShairplay.cmake
index bbb3372..506cffd 100644
--- a/cmake/modules/FindShairplay.cmake
+++ b/cmake/modules/FindShairplay.cmake
@@ -17,32 +17,26 @@
17find_path(SHAIRPLAY_INCLUDE_DIR shairplay/raop.h) 17find_path(SHAIRPLAY_INCLUDE_DIR shairplay/raop.h)
18 18
19include(FindPackageHandleStandardArgs) 19include(FindPackageHandleStandardArgs)
20if(NOT WIN32) 20find_library(SHAIRPLAY_LIBRARY NAMES shairplay libshairplay)
21 find_library(SHAIRPLAY_LIBRARY NAMES shairplay) 21
22 22if(SHAIRPLAY_INCLUDE_DIR AND SHAIRPLAY_LIBRARY)
23 if(SHAIRPLAY_INCLUDE_DIR AND SHAIRPLAY_LIBRARY) 23 include(CheckCSourceCompiles)
24 include(CheckCSourceCompiles) 24 set(CMAKE_REQUIRED_INCLUDES ${SHAIRPLAY_INCLUDE_DIR})
25 set(CMAKE_REQUIRED_INCLUDES ${SHAIRPLAY_INCLUDE_DIRS}) 25 set(CMAKE_REQUIRED_LIBRARIES ${SHAIRPLAY_LIBRARIES})
26 set(CMAKE_REQUIRED_LIBRARIES ${SHAIRPLAY_LIBRARIES}) 26 check_c_source_compiles("#include <shairplay/raop.h>
27 check_c_source_compiles("#include <shairplay/raop.h> 27
28 28 int main()
29 int main() 29 {
30 { 30 struct raop_callbacks_s foo;
31 struct raop_callbacks_s foo; 31 foo.cls;
32 foo.cls; 32 return 0;
33 return 0; 33 }
34 } 34 " HAVE_SHAIRPLAY_CALLBACK_CLS)
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() 35endif()
45 36
37find_package_handle_standard_args(Shairplay
38 REQUIRED_VARS SHAIRPLAY_LIBRARY SHAIRPLAY_INCLUDE_DIR HAVE_SHAIRPLAY_CALLBACK_CLS)
39
46if(SHAIRPLAY_FOUND) 40if(SHAIRPLAY_FOUND)
47 set(SHAIRPLAY_LIBRARIES ${SHAIRPLAY_LIBRARY}) 41 set(SHAIRPLAY_LIBRARIES ${SHAIRPLAY_LIBRARY})
48 set(SHAIRPLAY_INCLUDE_DIRS ${SHAIRPLAY_INCLUDE_DIR}) 42 set(SHAIRPLAY_INCLUDE_DIRS ${SHAIRPLAY_INCLUDE_DIR})