commit 3716a66e8f30f6438ae73a266dec2b91be8447fe
parent c6c19055d5ba3cb1713c1c762a19b70d653c9cd0
Author: Carlo Bramini <[email protected]>
Date: Sat, 11 Jul 2020 13:17:55 +0200
[CMAKE] Fix detection of OSS
When compiling for Windows, I discovered that CMake reported that OSS was found, which is not true since it is known to be unsupported by that platform.
I suggest to fix the included CMake script to avoid detection under WIN32 and also under APPLE.
This fix has been inspired by the FindOSS script implemented for GNUradio:
https://github.com/gnuradio/gnuradio/blob/master/cmake/Modules/FindOSS.cmake
Diffstat:
1 file changed, 7 insertions(+), 0 deletions(-)
diff --git a/cmake/FindOSS.cmake b/cmake/FindOSS.cmake
@@ -1,4 +1,11 @@
# Find OSS (Open Sound System)
+
+# OSS is not for APPLE or WINDOWS
+
+IF(APPLE OR WIN32)
+ RETURN()
+ENDIF()
+
find_path(OSS_INCLUDE_DIR sys/soundcard.h)
set(OSS_LIBRARIES True)
mark_as_advanced(OSS_INCLUDE_DIR)