diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 01:25:11 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 01:25:11 +0000 |
commit | 941f9937e0744d18de4cc0afa71e0caa925d82ac (patch) | |
tree | 67872b86dbf72d73e91188bf8de12594668fe4aa /cmake/FindOSS.cmake | |
parent | Adding upstream version 3.3.0+dfsg1. (diff) | |
download | freerdp3-941f9937e0744d18de4cc0afa71e0caa925d82ac.tar.xz freerdp3-941f9937e0744d18de4cc0afa71e0caa925d82ac.zip |
Adding upstream version 3.5.0+dfsg1.upstream/3.5.0+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | cmake/FindOSS.cmake | 39 |
1 files changed, 19 insertions, 20 deletions
diff --git a/cmake/FindOSS.cmake b/cmake/FindOSS.cmake index 811e052..a750db6 100644 --- a/cmake/FindOSS.cmake +++ b/cmake/FindOSS.cmake @@ -4,29 +4,27 @@ IF(UNIX) IF(CMAKE_SYSTEM_NAME MATCHES "Linux") - SET(OSS_HDR_NAME "linux/soundcard.h") - ELSE(CMAKE_SYSTEM_NAME MATCHES "Linux") - IF(CMAKE_SYSTEM_NAME MATCHES "FreeBSD") - SET(OSS_HDR_NAME "sys/soundcard.h") - ELSE(CMAKE_SYSTEM_NAME MATCHES "FreeBSD") - IF(CMAKE_SYSTEM_NAME MATCHES "OpenBSD") - SET(OSS_HDR_NAME "soundcard.h") - ELSE(CMAKE_SYSTEM_NAME MATCHES "OpenBSD") - SET(OSS_HDR_NAME "machine/soundcard.h") - ENDIF(CMAKE_SYSTEM_NAME MATCHES "OpenBSD") - ENDIF(CMAKE_SYSTEM_NAME MATCHES "FreeBSD") - ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux") + set(PLATFORM_PREFIX "linux/") + ELSEIF(CMAKE_SYSTEM_NAME MATCHES "FreeBSD") + set(PLATFORM_PREFIX "sys/") + ELSEIF(CMAKE_SYSTEM_NAME MATCHES "OpenBSD") + set(PLATFORM_PREFIX "machine/") + ENDIF() ENDIF(UNIX) -FIND_PATH(OSS_INCLUDE_DIR "${OSS_HDR_NAME}" - "/usr/include" "/usr/local/include" +set(OSS_HDR_NAME "${PLATFORM_PREFIX}soundcard.h" CACHE STRING "oss header include file name") +FIND_PATH(OSS_INCLUDE_DIRS ${OSS_HDR_NAME} + PATHS + "/usr/local/include" + PATH_SUFFIXES + ${PLATFORM_SUFFIX} ) -IF(OSS_INCLUDE_DIR) - SET(OSS_FOUND TRUE) -ELSE(OSS_INCLUDE_DIR) - SET(OSS_FOUND) -ENDIF(OSS_INCLUDE_DIR) +IF(OSS_INCLUDE_DIRS) + SET(OSS_FOUND ON CACHE BOOL "oss detection status") +ELSE(OSS_INCLUDE_DIRS) + SET(OSS_FOUND OFF CACHE BOOL "oss detection status") +ENDIF(OSS_INCLUDE_DIRS) IF(OSS_FOUND) MESSAGE(STATUS "Found OSS Audio") @@ -40,5 +38,6 @@ ENDIF(OSS_FOUND) MARK_AS_ADVANCED ( OSS_FOUND - OSS_INCLUDE_DIR + OSS_HDR_NAME + OSS_INCLUDE_DIRS ) |