diff options
Diffstat (limited to 'project/cmake/modules/FindAlsa.cmake')
| -rw-r--r-- | project/cmake/modules/FindAlsa.cmake | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/project/cmake/modules/FindAlsa.cmake b/project/cmake/modules/FindAlsa.cmake deleted file mode 100644 index a282243..0000000 --- a/project/cmake/modules/FindAlsa.cmake +++ /dev/null | |||
| @@ -1,46 +0,0 @@ | |||
| 1 | #.rst: | ||
| 2 | # FindAlsa | ||
| 3 | # -------- | ||
| 4 | # Finds the Alsa library | ||
| 5 | # | ||
| 6 | # This will will define the following variables:: | ||
| 7 | # | ||
| 8 | # ALSA_FOUND - system has Alsa | ||
| 9 | # ALSA_INCLUDE_DIRS - the Alsa include directory | ||
| 10 | # ALSA_LIBRARIES - the Alsa libraries | ||
| 11 | # ALSA_DEFINITIONS - the Alsa compile definitions | ||
| 12 | # | ||
| 13 | # and the following imported targets:: | ||
| 14 | # | ||
| 15 | # ALSA::ALSA - The Alsa library | ||
| 16 | |||
| 17 | if(PKG_CONFIG_FOUND) | ||
| 18 | pkg_check_modules(PC_ALSA alsa QUIET) | ||
| 19 | endif() | ||
| 20 | |||
| 21 | find_path(ALSA_INCLUDE_DIR NAMES alsa/asoundlib.h | ||
| 22 | PATHS ${PC_ALSA_INCLUDEDIR}) | ||
| 23 | find_library(ALSA_LIBRARY NAMES asound | ||
| 24 | PATHS ${PC_ALSA_LIBDIR}) | ||
| 25 | |||
| 26 | set(ALSA_VERSION ${PC_ALSA_VERSION}) | ||
| 27 | |||
| 28 | include(FindPackageHandleStandardArgs) | ||
| 29 | find_package_handle_standard_args(ALSA | ||
| 30 | REQUIRED_VARS ALSA_LIBRARY ALSA_INCLUDE_DIR | ||
| 31 | VERSION_VAR ALSA_VERSION) | ||
| 32 | |||
| 33 | if(ALSA_FOUND) | ||
| 34 | set(ALSA_INCLUDE_DIRS "") # Don't want these added as 'timer.h' is a dangerous file | ||
| 35 | set(ALSA_LIBRARIES ${ALSA_LIBRARY}) | ||
| 36 | set(ALSA_DEFINITIONS -DHAVE_ALSA=1 -DUSE_ALSA=1) | ||
| 37 | |||
| 38 | if(NOT TARGET ALSA::ALSA) | ||
| 39 | add_library(ALSA::ALSA UNKNOWN IMPORTED) | ||
| 40 | set_target_properties(ALSA::ALSA PROPERTIES | ||
| 41 | IMPORTED_LOCATION "${ALSA_LIBRARY}" | ||
| 42 | INTERFACE_COMPILE_DEFINITIONS "${ALSA_DEFINITIONS}") | ||
| 43 | endif() | ||
| 44 | endif() | ||
| 45 | |||
| 46 | mark_as_advanced(ALSA_INCLUDE_DIR ALSA_LIBRARY) | ||
