rename examples, install them, and correct #include path

This commit is contained in:
Andrew Kelley 2015-07-30 12:18:56 -07:00
parent 2a70bdb745
commit 860370d859
17 changed files with 34 additions and 31 deletions

View file

@ -67,8 +67,8 @@ set(LIBSOUNDIO_SOURCES
set(CONFIGURE_OUT_FILE "${CMAKE_BINARY_DIR}/config.h")
set(LIBSOUNDIO_HEADERS
"${CMAKE_SOURCE_DIR}/src/soundio.h"
"${CMAKE_SOURCE_DIR}/src/os.h"
"${CMAKE_SOURCE_DIR}/soundio/soundio.h"
"${CMAKE_SOURCE_DIR}/soundio/os.h"
${CONFIGURE_OUT_FILE}
)
@ -148,7 +148,6 @@ set_target_properties(libsoundio_shared PROPERTIES
include_directories(
${CMAKE_SOURCE_DIR}
${CMAKE_BINARY_DIR}
${ALSA_INCLUDE_DIRS}
)
target_link_libraries(libsoundio_shared LINK_PUBLIC
${JACK_LIBRARY}
@ -175,26 +174,29 @@ install(FILES
# Example Programs
add_executable(sine example/sine.c)
set_target_properties(sine PROPERTIES
add_executable(sio_sine example/sio_sine.c)
set_target_properties(sio_sine PROPERTIES
LINKER_LANGUAGE C
COMPILE_FLAGS ${EXAMPLE_CFLAGS})
include_directories(${EXAMPLE_INCLUDES})
target_link_libraries(sine libsoundio_shared)
target_link_libraries(sio_sine libsoundio_shared)
install(TARGETS sio_sine DESTINATION bin)
add_executable(list_devices example/list_devices.c)
set_target_properties(list_devices PROPERTIES
add_executable(sio_list_devices example/sio_list_devices.c)
set_target_properties(sio_list_devices PROPERTIES
LINKER_LANGUAGE C
COMPILE_FLAGS ${EXAMPLE_CFLAGS})
include_directories(${EXAMPLE_INCLUDES})
target_link_libraries(list_devices libsoundio_shared)
target_link_libraries(sio_list_devices libsoundio_shared)
install(TARGETS sio_list_devices DESTINATION bin)
add_executable(microphone example/microphone.c)
set_target_properties(microphone PROPERTIES
add_executable(sio_microphone example/sio_microphone.c)
set_target_properties(sio_microphone PROPERTIES
LINKER_LANGUAGE C
COMPILE_FLAGS ${EXAMPLE_CFLAGS})
include_directories(${EXAMPLE_INCLUDES})
target_link_libraries(microphone libsoundio_shared)
target_link_libraries(sio_microphone libsoundio_shared)
install(TARGETS sio_microphone DESTINATION bin)
@ -221,6 +223,7 @@ set_target_properties(underflow PROPERTIES
COMPILE_FLAGS ${EXAMPLE_CFLAGS})
include_directories(${EXAMPLE_INCLUDES})
target_link_libraries(underflow libsoundio_shared)
add_test(Underflow underflow)

View file

@ -5,7 +5,7 @@
* See http://opensource.org/licenses/MIT
*/
#include <soundio.h>
#include <soundio/soundio.h>
#include <stdio.h>
#include <string.h>

View file

@ -5,7 +5,7 @@
* See http://opensource.org/licenses/MIT
*/
#include <soundio.h>
#include <soundio/soundio.h>
#include <stdio.h>
#include <stdarg.h>

View file

@ -5,7 +5,7 @@
* See http://opensource.org/licenses/MIT
*/
#include <soundio.h>
#include <soundio/soundio.h>
#include <stdio.h>
#include <stdarg.h>

View file

@ -8,8 +8,8 @@
#ifndef SOUNDIO_ALSA_HPP
#define SOUNDIO_ALSA_HPP
#include "soundio.h"
#include "os.h"
#include "soundio/soundio.h"
#include "soundio/os.h"
#include "atomics.hpp"
#include <alsa/asoundlib.h>

View file

@ -8,8 +8,8 @@
#ifndef SOUNDIO_DUMMY_HPP
#define SOUNDIO_DUMMY_HPP
#include "soundio.h"
#include "os.h"
#include "soundio/soundio.h"
#include "soundio/os.h"
#include "atomics.hpp"
#include "ring_buffer.hpp"

View file

@ -8,8 +8,8 @@
#ifndef SOUNDIO_JACK_HPP
#define SOUNDIO_JACK_HPP
#include "soundio.h"
#include "os.h"
#include "soundio/soundio.h"
#include "soundio/os.h"
#include "atomics.hpp"
#include <jack/jack.h>

View file

@ -9,7 +9,7 @@
#define SOUNDIO_LIST_HPP
#include "util.hpp"
#include "soundio.h"
#include "soundio/soundio.h"
#include <assert.h>

View file

@ -5,8 +5,8 @@
* See http://opensource.org/licenses/MIT
*/
#include "os.h"
#include "soundio.h"
#include "soundio/os.h"
#include "soundio/soundio.h"
#include "util.hpp"
#include "atomics.hpp"

View file

@ -8,7 +8,7 @@
#ifndef SOUNDIO_PULSEAUDIO_HPP
#define SOUNDIO_PULSEAUDIO_HPP
#include "soundio.h"
#include "soundio/soundio.h"
#include "atomics.hpp"
#include <pulse/pulseaudio.h>

View file

@ -9,7 +9,7 @@
#define SOUNDIO_RING_BUFFER_HPP
#include "atomics.hpp"
#include "os.h"
#include "soundio/os.h"
struct SoundIoRingBuffer {
SoundIoOsMirroredMemory mem;

View file

@ -7,7 +7,7 @@
#include "soundio.hpp"
#include "util.hpp"
#include "os.h"
#include "soundio/os.h"
#include "config.h"
#include <string.h>

View file

@ -8,7 +8,7 @@
#ifndef SOUNDIO_SOUNDIO_HPP
#define SOUNDIO_SOUNDIO_HPP
#include "soundio.h"
#include "soundio/soundio.h"
#include "list.hpp"
#ifdef SOUNDIO_HAVE_JACK

View file

@ -5,8 +5,8 @@
* See http://opensource.org/licenses/MIT
*/
#include <soundio.h>
#include <os.h>
#include <soundio/soundio.h>
#include <soundio/os.h>
#include <stdio.h>
#include <stdarg.h>

View file

@ -1,7 +1,7 @@
#undef NDEBUG
#include "soundio.hpp"
#include "os.h"
#include "soundio/os.h"
#include "util.hpp"
#include "atomics.hpp"