diff --git a/CMakeLists.txt b/CMakeLists.txt index b2d9755..a5353b7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/example/list_devices.c b/example/sio_list_devices.c similarity index 99% rename from example/list_devices.c rename to example/sio_list_devices.c index d82e7cf..a6887e0 100644 --- a/example/list_devices.c +++ b/example/sio_list_devices.c @@ -5,7 +5,7 @@ * See http://opensource.org/licenses/MIT */ -#include +#include #include #include diff --git a/example/microphone.c b/example/sio_microphone.c similarity index 99% rename from example/microphone.c rename to example/sio_microphone.c index 6ee0e1c..8882930 100644 --- a/example/microphone.c +++ b/example/sio_microphone.c @@ -5,7 +5,7 @@ * See http://opensource.org/licenses/MIT */ -#include +#include #include #include diff --git a/example/sine.c b/example/sio_sine.c similarity index 99% rename from example/sine.c rename to example/sio_sine.c index 2f45340..4153098 100644 --- a/example/sine.c +++ b/example/sio_sine.c @@ -5,7 +5,7 @@ * See http://opensource.org/licenses/MIT */ -#include +#include #include #include diff --git a/src/os.h b/soundio/os.h similarity index 100% rename from src/os.h rename to soundio/os.h diff --git a/src/soundio.h b/soundio/soundio.h similarity index 100% rename from src/soundio.h rename to soundio/soundio.h diff --git a/src/alsa.hpp b/src/alsa.hpp index d9fa04b..a1d0dc9 100644 --- a/src/alsa.hpp +++ b/src/alsa.hpp @@ -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 diff --git a/src/dummy.hpp b/src/dummy.hpp index 368b16d..71bc61b 100644 --- a/src/dummy.hpp +++ b/src/dummy.hpp @@ -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" diff --git a/src/jack.hpp b/src/jack.hpp index f935705..0c89a8d 100644 --- a/src/jack.hpp +++ b/src/jack.hpp @@ -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 diff --git a/src/list.hpp b/src/list.hpp index 53c0039..76f6870 100644 --- a/src/list.hpp +++ b/src/list.hpp @@ -9,7 +9,7 @@ #define SOUNDIO_LIST_HPP #include "util.hpp" -#include "soundio.h" +#include "soundio/soundio.h" #include diff --git a/src/os.cpp b/src/os.cpp index b16de09..66d5a07 100644 --- a/src/os.cpp +++ b/src/os.cpp @@ -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" diff --git a/src/pulseaudio.hpp b/src/pulseaudio.hpp index 06952b7..f9da2e9 100644 --- a/src/pulseaudio.hpp +++ b/src/pulseaudio.hpp @@ -8,7 +8,7 @@ #ifndef SOUNDIO_PULSEAUDIO_HPP #define SOUNDIO_PULSEAUDIO_HPP -#include "soundio.h" +#include "soundio/soundio.h" #include "atomics.hpp" #include diff --git a/src/ring_buffer.hpp b/src/ring_buffer.hpp index a34a322..9ae7f4f 100644 --- a/src/ring_buffer.hpp +++ b/src/ring_buffer.hpp @@ -9,7 +9,7 @@ #define SOUNDIO_RING_BUFFER_HPP #include "atomics.hpp" -#include "os.h" +#include "soundio/os.h" struct SoundIoRingBuffer { SoundIoOsMirroredMemory mem; diff --git a/src/soundio.cpp b/src/soundio.cpp index 6226694..b3af5c5 100644 --- a/src/soundio.cpp +++ b/src/soundio.cpp @@ -7,7 +7,7 @@ #include "soundio.hpp" #include "util.hpp" -#include "os.h" +#include "soundio/os.h" #include "config.h" #include diff --git a/src/soundio.hpp b/src/soundio.hpp index 6a957b5..03619dc 100644 --- a/src/soundio.hpp +++ b/src/soundio.hpp @@ -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 diff --git a/test/underflow.c b/test/underflow.c index 76210e9..5808104 100644 --- a/test/underflow.c +++ b/test/underflow.c @@ -5,8 +5,8 @@ * See http://opensource.org/licenses/MIT */ -#include -#include +#include +#include #include #include diff --git a/test/unit_tests.cpp b/test/unit_tests.cpp index 88f464e..1f9713d 100644 --- a/test/unit_tests.cpp +++ b/test/unit_tests.cpp @@ -1,7 +1,7 @@ #undef NDEBUG #include "soundio.hpp" -#include "os.h" +#include "soundio/os.h" #include "util.hpp" #include "atomics.hpp"