mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-07 06:02:28 +02:00
build portaudio library to link with interface
This commit is contained in:
parent
8b18238be3
commit
99b96ec737
7 changed files with 4 additions and 1226 deletions
|
@ -4,7 +4,6 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/modules/")
|
|||
project(hifi)
|
||||
|
||||
set(GLM_ROOT_DIR ${CMAKE_SOURCE_DIR}/thirdparty)
|
||||
set(PORTAUDIO_ROOT_DIR ${CMAKE_SOURCE_DIR}/thirdparty/Portaudio)
|
||||
set(LODEPNG_ROOT_DIR ${CMAKE_SOURCE_DIR}/thirdparty/LodePNG)
|
||||
|
||||
add_subdirectory(interface)
|
|
@ -1,46 +0,0 @@
|
|||
# - Try to find the Portaudio library
|
||||
#
|
||||
# You must provide a PORTAUDIO_ROOT_DIR which contains the header and library
|
||||
#
|
||||
# Once done this will define
|
||||
#
|
||||
# PORTAUDIO_FOUND - system has Portaudio
|
||||
# PORTAUDIO_INCLUDE_DIRS - the Portaudio include directory
|
||||
# PORTAUDIO_LIBRARY - Link these to use Portaudio
|
||||
#
|
||||
# Copyright (c) 2013 Stephen Birarda <birarda@coffeeandpower.com>
|
||||
#
|
||||
# Heavily based on Andreas Schneider's original FindPortaudio.cmake
|
||||
# which can be found at http://gnuradio.org/redmine/projects/gnuradio/repository/
|
||||
|
||||
|
||||
if (PORTAUDIO_LIBRARY AND PORTAUDIO_INCLUDE_DIRS)
|
||||
# in cache already
|
||||
set(PORTAUDIO_FOUND TRUE)
|
||||
else (PORTAUDIO_LIBRARY AND PORTAUDIO_INCLUDE_DIRS)
|
||||
|
||||
set(PORTAUDIO_INCLUDE_DIRS
|
||||
${PORTAUDIO_ROOT_DIR}/portaudio.h
|
||||
)
|
||||
set(PORTAUDIO_LIBRARY
|
||||
${PORTAUDIO_ROOT_DIR}/libportaudio.a
|
||||
)
|
||||
|
||||
if (PORTAUDIO_INCLUDE_DIRS AND PORTAUDIO_LIBRARY)
|
||||
set(PORTAUDIO_FOUND TRUE)
|
||||
endif (PORTAUDIO_INCLUDE_DIRS AND PORTAUDIO_LIBRARY)
|
||||
|
||||
if (PORTAUDIO_FOUND)
|
||||
if (NOT Portaudio_FIND_QUIETLY)
|
||||
message(STATUS "Found Portaudio: ${PORTAUDIO_LIBRARY}")
|
||||
endif (NOT Portaudio_FIND_QUIETLY)
|
||||
else (PORTAUDIO_FOUND)
|
||||
if (Portaudio_FIND_REQUIRED)
|
||||
message(FATAL_ERROR "Could not find Portaudio")
|
||||
endif (Portaudio_FIND_REQUIRED)
|
||||
endif (PORTAUDIO_FOUND)
|
||||
|
||||
# show the PORTAUDIO_INCLUDE_DIRS and PORTAUDIO_LIBRARY variables only in the advanced view
|
||||
mark_as_advanced(PORTAUDIO_INCLUDE_DIRS PORTAUDIO_LIBRARY)
|
||||
|
||||
endif (PORTAUDIO_LIBRARY AND PORTAUDIO_INCLUDE_DIRS)
|
|
@ -15,23 +15,22 @@ file(GLOB INTERFACE_SRCS src/*.cpp src/*.h)
|
|||
include_directories(${PROJECT_BINARY_DIR}/includes)
|
||||
|
||||
add_executable(interface ${INTERFACE_SRCS})
|
||||
add_subdirectory(${CMAKE_SOURCE_DIR}/thirdparty/portaudio thirdparty/portaudio)
|
||||
|
||||
find_package(OpenGL REQUIRED)
|
||||
find_package(GLUT REQUIRED)
|
||||
find_package(GLM REQUIRED)
|
||||
find_package(Portaudio REQUIRED)
|
||||
find_package(LodePNG REQUIRED)
|
||||
|
||||
include_directories(
|
||||
${OPENGL_INCLUDE_DIRS}
|
||||
${GLUT_INCLUDE_DIRS}
|
||||
${GLM_INCLUDE_DIRS}
|
||||
${PORTAUDIO_INCLUDE_DIRS}
|
||||
${LODEPNG_INCLUDE_DIRS}
|
||||
)
|
||||
target_link_libraries(interface
|
||||
${OPENGL_LIBRARY}
|
||||
${GLUT_LIBRARY}
|
||||
${PORTAUDIO_LIBRARY}
|
||||
${LODEPNG_LIBRARY}
|
||||
portaudio_static
|
||||
)
|
|
@ -11,7 +11,7 @@
|
|||
#include <pthread.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/stat.h>
|
||||
#include <cstring>g
|
||||
#include <cstring>
|
||||
#include "Audio.h"
|
||||
#include "Util.h"
|
||||
#include "AudioSource.h"
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
#define __interface__Audio__
|
||||
|
||||
#include <iostream>
|
||||
#include <Portaudio/portaudio.h>
|
||||
#include <portaudio/include/portaudio.h>
|
||||
#include "Head.h"
|
||||
#include "AudioData.h"
|
||||
|
||||
|
|
BIN
thirdparty/Portaudio/libportaudio.a
vendored
BIN
thirdparty/Portaudio/libportaudio.a
vendored
Binary file not shown.
1174
thirdparty/Portaudio/portaudio.h
vendored
1174
thirdparty/Portaudio/portaudio.h
vendored
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue