Adding OpenBSD's sndio support.

Updating jackmsr's work, adding sndio cmake module.
Updating 64 bits OS arch detection (amd64).
This commit is contained in:
David Carlier
2016-03-26 12:48:28 +00:00
parent d1739ce5fe
commit 43a0718d0b
12 changed files with 487 additions and 2 deletions

View File

@@ -3,7 +3,7 @@ IF(WIN32)
ELSEIF(APPLE)
SET(LMMS_BUILD_APPLE 1)
ELSEIF(${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD")
SET(LMMS_BUILD_OPENBSD 1)
SET(LMMS_BUILD_OPENBSD 1)
ELSEIF(HAIKU)
SET(LMMS_BUILD_HAIKU 1)
ELSE()
@@ -27,7 +27,7 @@ ELSE(WIN32)
EXEC_PROGRAM( ${CMAKE_C_COMPILER} ARGS "-dumpmachine ${CMAKE_C_FLAGS}" OUTPUT_VARIABLE Machine )
MESSAGE("Machine: ${Machine}")
STRING(REGEX MATCH "i.86" IS_X86 "${Machine}")
STRING(REGEX MATCH "86_64" IS_X86_64 "${Machine}")
STRING(REGEX MATCH "86_64|amd64" IS_X86_64 "${Machine}")
ENDIF(WIN32)
IF(IS_X86)

View File

@@ -0,0 +1,32 @@
# sndio check, based on FindAlsa.cmake
#
# Copyright (c) 2006, David Faure, <faure@kde.org>
# Copyright (c) 2007, Matthias Kretz <kretz@kde.org>
# Copyright (c) 2009, Jacob Meuser <jakemsr@sdf.lonestar.org>
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
include(CheckIncludeFiles)
include(CheckIncludeFileCXX)
include(CheckLibraryExists)
# Already done by toplevel
find_library(SNDIO_LIBRARY sndio)
set(SNDIO_LIBRARY_DIR "")
if(SNDIO_LIBRARY)
get_filename_component(SNDIO_LIBRARY_DIR ${SNDIO_LIBRARY} PATH)
endif(SNDIO_LIBRARY)
check_library_exists(sndio sio_open "${SNDIO_LIBRARY_DIR}" HAVE_SNDIO)
if(HAVE_SNDIO)
message(STATUS "Found sndio: ${SNDIO_LIBRARY}")
else(HAVE_SNDIO)
message(STATUS "sndio not found")
endif(HAVE_SNDIO)
set(SNDIO_FOUND ${HAVE_SNDIO})
find_path(SNDIO_INCLUDES sndio.h)
mark_as_advanced(SNDIO_INCLUDES SNDIO_LIBRARY)