[bsd] clean up bsd related detections

This commit is contained in:
akallabeth
2023-10-10 20:46:43 +02:00
committed by akallabeth
parent 0529658e75
commit 822ba31c31
5 changed files with 36 additions and 35 deletions

View File

@@ -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
View 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()