[bsd] clean up bsd related detections
This commit is contained in:
parent
0529658e75
commit
822ba31c31
@ -76,6 +76,7 @@ if(WITH_CLANG_FORMAT)
|
||||
include(ClangFormat)
|
||||
endif()
|
||||
|
||||
include(DetectBSD)
|
||||
include(CheckIncludeFiles)
|
||||
include(CheckLibraryExists)
|
||||
include(CheckSymbolExists)
|
||||
@ -221,25 +222,6 @@ if (EXPORT_ALL_SYMBOLS)
|
||||
add_definitions(-DEXPORT_ALL_SYMBOLS)
|
||||
endif(EXPORT_ALL_SYMBOLS)
|
||||
|
||||
# BSD
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "BSD")
|
||||
set(BSD TRUE)
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
|
||||
set(FREEBSD TRUE)
|
||||
endif()
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "kFreeBSD")
|
||||
set(KFREEBSD TRUE)
|
||||
endif()
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD")
|
||||
set(OPENBSD TRUE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "DragonFly")
|
||||
set(BSD TRUE)
|
||||
set(FREEBSD TRUE)
|
||||
endif()
|
||||
|
||||
if(FREEBSD)
|
||||
find_path(EPOLLSHIM_INCLUDE_DIR NAMES sys/epoll.h sys/timerfd.h HINTS /usr/local/include/libepoll-shim)
|
||||
find_library(EPOLLSHIM_LIBS NAMES epoll-shim libepoll-shim HINTS /usr/local/lib)
|
||||
@ -506,13 +488,6 @@ if(APPLE)
|
||||
endif()
|
||||
endif(APPLE)
|
||||
|
||||
# OpenBSD
|
||||
if(OPENBSD)
|
||||
set(WITH_MANPAGES "ON")
|
||||
set(WITH_SNDIO "ON")
|
||||
set(WITH_WAYLAND "OFF")
|
||||
endif()
|
||||
|
||||
# Android
|
||||
if(ANDROID)
|
||||
set(WITH_LIBRARY_VERSIONING "OFF")
|
||||
@ -568,7 +543,7 @@ else()
|
||||
unset(FREERDP_HAVE_VALGRIND_MEMCHECK_H CACHE)
|
||||
endif()
|
||||
|
||||
if(UNIX OR CYGWIN)
|
||||
if((UNIX OR CYGWIN) AND NOT BSD)
|
||||
set(WAYLAND_FEATURE_TYPE "RECOMMENDED")
|
||||
else()
|
||||
set(WAYLAND_FEATURE_TYPE "DISABLED")
|
||||
@ -589,10 +564,6 @@ set(MBEDTLS_FEATURE_TYPE "OPTIONAL")
|
||||
set(MBEDTLS_FEATURE_PURPOSE "cryptography")
|
||||
set(MBEDTLS_FEATURE_DESCRIPTION "encryption, certificate validation, hashing functions")
|
||||
|
||||
set(SNDIO_FEATURE_TYPE "OPTIONAL")
|
||||
set(SNDIO_FEATURE_PURPOSE "sound")
|
||||
set(SNDIO_FEATURE_DESCRIPTION "OpenBSD audio input/output")
|
||||
|
||||
set(PCSC_FEATURE_TYPE "RECOMMENDED")
|
||||
set(PCSC_FEATURE_PURPOSE "smart card")
|
||||
set(PCSC_FEATURE_DESCRIPTION "smart card device redirection")
|
||||
@ -643,7 +614,6 @@ set(SOXR_FEATURE_DESCRIPTION "SOX audio resample library")
|
||||
|
||||
if(WIN32)
|
||||
set(WAYLAND_FEATURE_TYPE "DISABLED")
|
||||
set(SNDIO_FEATURE_TYPE "DISABLED")
|
||||
set(PCSC_FEATURE_TYPE "DISABLED")
|
||||
set(FFMPEG_FEATURE_TYPE "OPTIONAL")
|
||||
set(VAAPI_FEATURE_TYPE "DISABLED")
|
||||
@ -653,7 +623,6 @@ if(APPLE)
|
||||
set(FFMPEG_FEATURE_TYPE "OPTIONAL")
|
||||
set(VAAPI_FEATURE_TYPE "DISABLED")
|
||||
set(WAYLAND_FEATURE_TYPE "DISABLED")
|
||||
set(SNDIO_FEATURE_TYPE "DISABLED")
|
||||
if(IOS)
|
||||
set(PCSC_FEATURE_TYPE "DISABLED")
|
||||
endif()
|
||||
@ -661,7 +630,6 @@ endif()
|
||||
|
||||
if(ANDROID)
|
||||
set(WAYLAND_FEATURE_TYPE "DISABLED")
|
||||
set(SNDIO_FEATURE_TYPE "DISABLED")
|
||||
set(PCSC_FEATURE_TYPE "DISABLED")
|
||||
set(VAAPI_FEATURE_TYPE "DISABLED")
|
||||
endif()
|
||||
|
@ -18,6 +18,8 @@
|
||||
|
||||
define_channel_client_subsystem("audin" "sndio" "")
|
||||
|
||||
find_package(SNDIO REQUIRED)
|
||||
|
||||
set(${MODULE_PREFIX}_SRCS
|
||||
audin_sndio.c)
|
||||
|
||||
|
@ -18,6 +18,8 @@
|
||||
|
||||
define_channel_client_subsystem("rdpsnd" "sndio" "")
|
||||
|
||||
find_package(SNDIO REQUIRED)
|
||||
|
||||
set(${MODULE_PREFIX}_SRCS
|
||||
rdpsnd_sndio.c
|
||||
)
|
||||
|
@ -13,7 +13,10 @@ elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "sparc")
|
||||
set(TARGET_ARCH "sparc")
|
||||
endif()
|
||||
|
||||
option(WITH_MANPAGES "Generate manpages." ON)
|
||||
if (NOT OPENBSD)
|
||||
set(MANPAGE_DEF ON)
|
||||
endif()
|
||||
option(WITH_MANPAGES "Generate manpages." ${MANPAGE_DEF})
|
||||
option(WITH_PROFILER "Compile profiler." OFF)
|
||||
option(WITH_GPROF "Compile with GProf profiler." OFF)
|
||||
|
||||
@ -181,6 +184,14 @@ if (UNIX AND NOT APPLE)
|
||||
option(WITH_OSS "use alsa for sound" ${OSS_FOUND})
|
||||
endif()
|
||||
|
||||
if (OPENBSD)
|
||||
find_package(SNDIO)
|
||||
option(WITH_SNDIO "use SNDIO for sound" ${SNDIO_FOUND# OpenBSD
|
||||
endif()
|
||||
|
||||
})
|
||||
endif()
|
||||
|
||||
option(BUILD_FUZZERS "Use BUILD_FUZZERS to build fuzzing tests" OFF)
|
||||
|
||||
if (BUILD_FUZZERS)
|
||||
|
18
cmake/DetectBSD.cmake
Normal file
18
cmake/DetectBSD.cmake
Normal file
@ -0,0 +1,18 @@
|
||||
# BSD
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "BSD")
|
||||
set(BSD TRUE CACHE INTERNAL "BSD detection")
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
|
||||
set(FREEBSD TRUE CACHE INTERNAL "BSD detection")
|
||||
endif()
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "kFreeBSD")
|
||||
set(KFREEBSD TRUE CACHE INTERNAL "BSD detection")
|
||||
endif()
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD")
|
||||
set(OPENBSD TRUE CACHE INTERNAL "BSD detection")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "DragonFly")
|
||||
set(BSD TRUE CACHE INTERNAL "BSD detection")
|
||||
set(FREEBSD TRUE CACHE INTERNAL "BSD detection")
|
||||
endif()
|
Loading…
Reference in New Issue
Block a user