diff options
| author | manuel <manuel@mausz.at> | 2020-07-02 23:09:26 +0200 |
|---|---|---|
| committer | manuel <manuel@mausz.at> | 2020-07-02 23:09:26 +0200 |
| commit | 5f8335c1e49ce108ef3481863833c98efa00411b (patch) | |
| tree | f02b5c1c9765bb6a14c8eb42bb4f81b9face0b55 /cmake/modules/FindShairplay.cmake | |
| parent | e317daf081a1048904fdf0b548946fa3ba6593a7 (diff) | |
| download | kodi-pvr-build-5f8335c1e49ce108ef3481863833c98efa00411b.tar.gz kodi-pvr-build-5f8335c1e49ce108ef3481863833c98efa00411b.tar.bz2 kodi-pvr-build-5f8335c1e49ce108ef3481863833c98efa00411b.zip | |
Diffstat (limited to 'cmake/modules/FindShairplay.cmake')
| -rw-r--r-- | cmake/modules/FindShairplay.cmake | 42 |
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 @@ | |||
| 17 | find_path(SHAIRPLAY_INCLUDE_DIR shairplay/raop.h) | 17 | find_path(SHAIRPLAY_INCLUDE_DIR shairplay/raop.h) |
| 18 | 18 | ||
| 19 | include(FindPackageHandleStandardArgs) | 19 | include(FindPackageHandleStandardArgs) |
| 20 | if(NOT WIN32) | 20 | find_library(SHAIRPLAY_LIBRARY NAMES shairplay libshairplay) |
| 21 | find_library(SHAIRPLAY_LIBRARY NAMES shairplay) | 21 | |
| 22 | 22 | if(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) | ||
| 40 | else() | ||
| 41 | # Dynamically loaded DLL | ||
| 42 | find_package_handle_standard_args(Shairplay | ||
| 43 | REQUIRED_VARS SHAIRPLAY_INCLUDE_DIR) | ||
| 44 | endif() | 35 | endif() |
| 45 | 36 | ||
| 37 | find_package_handle_standard_args(Shairplay | ||
| 38 | REQUIRED_VARS SHAIRPLAY_LIBRARY SHAIRPLAY_INCLUDE_DIR HAVE_SHAIRPLAY_CALLBACK_CLS) | ||
| 39 | |||
| 46 | if(SHAIRPLAY_FOUND) | 40 | if(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}) |
