commit fb0a3ef9881bd6f481c9480e7977015e8b6f6681
parent b9be43b4b11b32284eac2c86779b75622a077c2d
Author: Carlo Bramini <30959007+carlo-bramini@users.noreply.github.com>
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)