build portaudio library to link with interface

This commit is contained in:
Stephen Birarda 2013-02-08 15:58:12 -08:00
parent 8b18238be3
commit 99b96ec737
7 changed files with 4 additions and 1226 deletions

View file

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

View file

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

View file

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

View file

@ -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"

View file

@ -10,7 +10,7 @@
#define __interface__Audio__
#include <iostream>
#include <Portaudio/portaudio.h>
#include <portaudio/include/portaudio.h>
#include "Head.h"
#include "AudioData.h"

Binary file not shown.

File diff suppressed because it is too large Load diff