2015-08-21 02:46:16 +02:00
|
|
|
cmake_minimum_required(VERSION 2.8.5)
|
2015-11-01 23:18:37 +01:00
|
|
|
project(libsoundio C)
|
2015-09-12 10:34:14 +02:00
|
|
|
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH})
|
2015-08-21 02:46:16 +02:00
|
|
|
|
|
|
|
if(CMAKE_VERSION VERSION_LESS 3.0.0)
|
|
|
|
set(CMAKE_INSTALL_LIBDIR "lib" CACHE PATH "library install dir (lib)")
|
|
|
|
set(CMAKE_INSTALL_INCLUDEDIR "include" CACHE PATH "header base install dir (include)")
|
|
|
|
set(CMAKE_INSTALL_BINDIR "bin" CACHE PATH "user executables (bin)")
|
|
|
|
else()
|
|
|
|
cmake_policy(SET CMP0042 NEW)
|
|
|
|
cmake_policy(SET CMP0046 NEW)
|
|
|
|
include(GNUInstallDirs)
|
|
|
|
endif()
|
2015-06-30 23:04:45 +02:00
|
|
|
|
|
|
|
if(NOT CMAKE_BUILD_TYPE)
|
|
|
|
set(CMAKE_BUILD_TYPE "Debug" CACHE STRING
|
|
|
|
"Choose the type of build, options are: Debug Release RelWithDebInfo MinSizeRel." FORCE)
|
|
|
|
endif()
|
|
|
|
|
2015-09-03 20:35:32 +02:00
|
|
|
set(LIBSOUNDIO_VERSION_MAJOR 1)
|
2016-01-31 20:02:41 +01:00
|
|
|
set(LIBSOUNDIO_VERSION_MINOR 1)
|
|
|
|
set(LIBSOUNDIO_VERSION_PATCH 0)
|
2015-06-30 23:04:45 +02:00
|
|
|
set(LIBSOUNDIO_VERSION "${LIBSOUNDIO_VERSION_MAJOR}.${LIBSOUNDIO_VERSION_MINOR}.${LIBSOUNDIO_VERSION_PATCH}")
|
|
|
|
message("Configuring libsoundio version ${LIBSOUNDIO_VERSION}")
|
|
|
|
|
2015-09-04 18:21:54 +02:00
|
|
|
option(BUILD_STATIC_LIBS "Build static libraries" ON)
|
2015-09-05 14:07:22 +02:00
|
|
|
option(BUILD_EXAMPLE_PROGRAMS "Build example programs" ON)
|
|
|
|
option(BUILD_TESTS "Build tests" ON)
|
2015-09-01 00:51:49 +02:00
|
|
|
option(ENABLE_JACK "Enable JACK backend" ON)
|
|
|
|
option(ENABLE_PULSEAUDIO "Enable PulseAudio backend" ON)
|
|
|
|
option(ENABLE_ALSA "Enable ALSA backend" ON)
|
|
|
|
option(ENABLE_COREAUDIO "Enable CoreAudio backend" ON)
|
|
|
|
option(ENABLE_WASAPI "Enable WASAPI backend" ON)
|
|
|
|
|
2015-06-30 23:04:45 +02:00
|
|
|
find_package(Threads)
|
|
|
|
if(Threads_FOUND)
|
|
|
|
set(STATUS_THREADS "OK")
|
|
|
|
else(Threads_FOUND)
|
|
|
|
set(STATUS_THREADS "not found")
|
|
|
|
endif(Threads_FOUND)
|
|
|
|
|
2015-09-01 00:51:49 +02:00
|
|
|
if(ENABLE_JACK)
|
|
|
|
find_package(JACK)
|
|
|
|
if(JACK_FOUND)
|
|
|
|
set(STATUS_JACK "OK")
|
|
|
|
set(SOUNDIO_HAVE_JACK true)
|
|
|
|
include_directories(${JACK_INCLUDE_DIR})
|
|
|
|
else()
|
|
|
|
set(STATUS_JACK "not found")
|
|
|
|
set(SOUNDIO_HAVE_JACK false)
|
|
|
|
set(JACK_LIBRARY "")
|
|
|
|
endif()
|
2015-07-25 03:43:14 +02:00
|
|
|
else()
|
2015-09-01 00:51:49 +02:00
|
|
|
set(STATUS_JACK "disabled")
|
2015-07-25 03:43:14 +02:00
|
|
|
set(SOUNDIO_HAVE_JACK false)
|
|
|
|
set(JACK_LIBRARY "")
|
|
|
|
endif()
|
2015-06-30 23:04:45 +02:00
|
|
|
|
2015-09-01 00:51:49 +02:00
|
|
|
if(ENABLE_PULSEAUDIO)
|
|
|
|
find_package(PulseAudio)
|
|
|
|
if(PULSEAUDIO_FOUND)
|
|
|
|
set(STATUS_PULSEAUDIO "OK")
|
|
|
|
set(SOUNDIO_HAVE_PULSEAUDIO true)
|
|
|
|
include_directories(${PULSEAUDIO_INCLUDE_DIR})
|
|
|
|
else()
|
|
|
|
set(STATUS_PULSEAUDIO "not found")
|
|
|
|
set(SOUNDIO_HAVE_PULSEAUDIO false)
|
|
|
|
set(PULSEAUDIO_LIBRARY "")
|
|
|
|
endif()
|
2015-06-30 23:04:45 +02:00
|
|
|
else()
|
2015-09-01 00:51:49 +02:00
|
|
|
set(STATUS_PULSEAUDIO "disabled")
|
2015-07-03 00:55:11 +02:00
|
|
|
set(SOUNDIO_HAVE_PULSEAUDIO false)
|
|
|
|
set(PULSEAUDIO_LIBRARY "")
|
2015-06-30 23:04:45 +02:00
|
|
|
endif()
|
|
|
|
|
2015-09-01 00:51:49 +02:00
|
|
|
if(ENABLE_ALSA)
|
|
|
|
find_package(ALSA)
|
|
|
|
if(ALSA_FOUND)
|
|
|
|
set(STATUS_ALSA "OK")
|
|
|
|
set(SOUNDIO_HAVE_ALSA true)
|
|
|
|
include_directories(${ALSA_INCLUDE_DIRS})
|
|
|
|
else()
|
|
|
|
set(STATUS_ALSA "not found")
|
|
|
|
set(SOUNDIO_HAVE_ALSA false)
|
|
|
|
set(ALSA_LIBRARIES "")
|
|
|
|
endif()
|
2015-06-30 23:04:45 +02:00
|
|
|
else()
|
2015-09-01 00:51:49 +02:00
|
|
|
set(STATUS_ALSA "disabled")
|
2015-07-03 00:55:11 +02:00
|
|
|
set(SOUNDIO_HAVE_ALSA false)
|
|
|
|
set(ALSA_LIBRARIES "")
|
2015-06-30 23:04:45 +02:00
|
|
|
endif()
|
|
|
|
|
2015-09-01 00:51:49 +02:00
|
|
|
if(ENABLE_COREAUDIO)
|
|
|
|
find_package(CoreAudio)
|
|
|
|
if(COREAUDIO_FOUND)
|
|
|
|
set(STATUS_COREAUDIO "OK")
|
|
|
|
set(SOUNDIO_HAVE_COREAUDIO true)
|
|
|
|
include_directories(${COREAUDIO_INCLUDE_DIR})
|
|
|
|
|
|
|
|
find_path(COREFOUNDATION_INCLUDE_DIR NAMES CoreFoundation.h)
|
|
|
|
find_library(COREFOUNDATION_LIBRARY NAMES CoreFoundation)
|
|
|
|
include_directories(${COREFOUNDATION_INCLUDE_DIR})
|
|
|
|
|
|
|
|
find_path(AUDIOUNIT_INCLUDE_DIR NAMES AudioUnit.h)
|
|
|
|
find_library(AUDIOUNIT_LIBRARY NAMES AudioUnit)
|
|
|
|
include_directories(${AUDIOUNIT_INCLUDE_DIR})
|
|
|
|
else()
|
|
|
|
set(STATUS_COREAUDIO "not found")
|
|
|
|
set(SOUNDIO_HAVE_COREAUDIO false)
|
|
|
|
set(COREAUDIO_LIBRARY "")
|
|
|
|
set(COREFOUNDATION_LIBRARY "")
|
|
|
|
set(AUDIOUNIT_LIBRARY "")
|
|
|
|
endif()
|
2015-08-01 03:52:51 +02:00
|
|
|
else()
|
2015-09-01 00:51:49 +02:00
|
|
|
set(STATUS_COREAUDIO "disabled")
|
2015-08-01 03:52:51 +02:00
|
|
|
set(SOUNDIO_HAVE_COREAUDIO false)
|
|
|
|
set(COREAUDIO_LIBRARY "")
|
2015-08-01 22:00:46 +02:00
|
|
|
set(COREFOUNDATION_LIBRARY "")
|
2015-08-04 07:27:09 +02:00
|
|
|
set(AUDIOUNIT_LIBRARY "")
|
2015-08-01 03:52:51 +02:00
|
|
|
endif()
|
|
|
|
|
2015-09-01 00:51:49 +02:00
|
|
|
if(ENABLE_WASAPI)
|
|
|
|
find_package(WASAPI)
|
|
|
|
if(WASAPI_FOUND)
|
|
|
|
set(STATUS_WASAPI "OK")
|
|
|
|
set(SOUNDIO_HAVE_WASAPI true)
|
|
|
|
else()
|
|
|
|
set(STATUS_WASAPI "not found")
|
|
|
|
set(SOUNDIO_HAVE_WASAPI false)
|
|
|
|
endif()
|
2015-08-09 00:22:50 +02:00
|
|
|
else()
|
2015-09-01 00:51:49 +02:00
|
|
|
set(STATUS_WASAPI "disabled")
|
2015-08-09 00:22:50 +02:00
|
|
|
set(SOUNDIO_HAVE_WASAPI false)
|
|
|
|
endif()
|
|
|
|
|
2015-08-01 03:52:51 +02:00
|
|
|
|
2015-07-02 12:48:27 +02:00
|
|
|
set(LIBSOUNDIO_SOURCES
|
2015-11-01 23:18:37 +01:00
|
|
|
"${CMAKE_SOURCE_DIR}/src/soundio.c"
|
|
|
|
"${CMAKE_SOURCE_DIR}/src/util.c"
|
|
|
|
"${CMAKE_SOURCE_DIR}/src/os.c"
|
|
|
|
"${CMAKE_SOURCE_DIR}/src/dummy.c"
|
|
|
|
"${CMAKE_SOURCE_DIR}/src/channel_layout.c"
|
|
|
|
"${CMAKE_SOURCE_DIR}/src/ring_buffer.c"
|
2015-07-02 12:48:27 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
set(CONFIGURE_OUT_FILE "${CMAKE_BINARY_DIR}/config.h")
|
|
|
|
set(LIBSOUNDIO_HEADERS
|
2015-07-30 21:18:56 +02:00
|
|
|
"${CMAKE_SOURCE_DIR}/soundio/soundio.h"
|
2015-09-24 18:25:51 +02:00
|
|
|
"${CMAKE_SOURCE_DIR}/soundio/endian.h"
|
2015-07-02 12:48:27 +02:00
|
|
|
)
|
|
|
|
|
2015-07-25 03:43:14 +02:00
|
|
|
if(SOUNDIO_HAVE_JACK)
|
|
|
|
set(LIBSOUNDIO_SOURCES ${LIBSOUNDIO_SOURCES}
|
2015-11-01 23:18:37 +01:00
|
|
|
"${CMAKE_SOURCE_DIR}/src/jack.c"
|
2015-07-25 03:43:14 +02:00
|
|
|
)
|
|
|
|
endif()
|
2015-07-04 11:57:06 +02:00
|
|
|
if(SOUNDIO_HAVE_PULSEAUDIO)
|
|
|
|
set(LIBSOUNDIO_SOURCES ${LIBSOUNDIO_SOURCES}
|
2015-11-01 23:18:37 +01:00
|
|
|
"${CMAKE_SOURCE_DIR}/src/pulseaudio.c"
|
2015-07-04 11:57:06 +02:00
|
|
|
)
|
|
|
|
endif()
|
2015-07-07 11:55:32 +02:00
|
|
|
if(SOUNDIO_HAVE_ALSA)
|
|
|
|
set(LIBSOUNDIO_SOURCES ${LIBSOUNDIO_SOURCES}
|
2015-11-01 23:18:37 +01:00
|
|
|
"${CMAKE_SOURCE_DIR}/src/alsa.c"
|
2015-07-07 11:55:32 +02:00
|
|
|
)
|
|
|
|
endif()
|
2015-08-01 03:52:51 +02:00
|
|
|
if(SOUNDIO_HAVE_COREAUDIO)
|
|
|
|
set(LIBSOUNDIO_SOURCES ${LIBSOUNDIO_SOURCES}
|
2015-11-01 23:18:37 +01:00
|
|
|
"${CMAKE_SOURCE_DIR}/src/coreaudio.c"
|
2015-08-01 03:52:51 +02:00
|
|
|
)
|
|
|
|
endif()
|
2015-08-09 00:22:50 +02:00
|
|
|
if(SOUNDIO_HAVE_WASAPI)
|
|
|
|
set(LIBSOUNDIO_SOURCES ${LIBSOUNDIO_SOURCES}
|
2015-11-01 23:18:37 +01:00
|
|
|
"${CMAKE_SOURCE_DIR}/src/wasapi.c"
|
2015-08-09 00:22:50 +02:00
|
|
|
)
|
|
|
|
endif()
|
2015-07-04 11:57:06 +02:00
|
|
|
|
2015-09-02 21:21:41 +02:00
|
|
|
include_directories(
|
|
|
|
${CMAKE_SOURCE_DIR}
|
|
|
|
${CMAKE_BINARY_DIR}
|
|
|
|
"${CMAKE_SOURCE_DIR}/test"
|
|
|
|
"${CMAKE_SOURCE_DIR}/src"
|
|
|
|
)
|
|
|
|
|
|
|
|
set(LIBSOUNDIO_LIBS
|
|
|
|
${JACK_LIBRARY}
|
|
|
|
${PULSEAUDIO_LIBRARY}
|
|
|
|
${ALSA_LIBRARIES}
|
|
|
|
${COREAUDIO_LIBRARY}
|
|
|
|
${COREFOUNDATION_LIBRARY}
|
|
|
|
${AUDIOUNIT_LIBRARY}
|
|
|
|
${CMAKE_THREAD_LIBS_INIT}
|
|
|
|
)
|
|
|
|
|
2016-05-25 04:21:49 +02:00
|
|
|
if(MSVC)
|
|
|
|
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /WX /Wall")
|
|
|
|
set(LIB_CFLAGS "/TP /W4")
|
|
|
|
set(EXAMPLE_CFLAGS "/W4")
|
|
|
|
set(TEST_CFLAGS "${LIB_CFLAGS}")
|
|
|
|
set(TEST_LDFLAGS " ")
|
|
|
|
else()
|
|
|
|
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Werror -pedantic")
|
|
|
|
set(LIB_CFLAGS "-std=c11 -fvisibility=hidden -Wall -Werror=strict-prototypes -Werror=old-style-definition -Werror=missing-prototypes -D_REENTRANT -D_POSIX_C_SOURCE=200809L -Wno-missing-braces")
|
|
|
|
set(EXAMPLE_CFLAGS "-std=c99 -Wall")
|
|
|
|
set(TEST_CFLAGS "${LIB_CFLAGS} -fprofile-arcs -ftest-coverage")
|
|
|
|
set(TEST_LDFLAGS "-fprofile-arcs -ftest-coverage")
|
|
|
|
endif()
|
2015-06-30 23:04:45 +02:00
|
|
|
|
2015-08-26 11:40:04 +02:00
|
|
|
configure_file(
|
2015-06-30 23:04:45 +02:00
|
|
|
"${CMAKE_SOURCE_DIR}/src/config.h.in"
|
|
|
|
${CONFIGURE_OUT_FILE}
|
|
|
|
)
|
2015-08-26 11:40:04 +02:00
|
|
|
set(DOXYGEN_CONF_FILE "${CMAKE_BINARY_DIR}/doxygen.conf")
|
|
|
|
configure_file(
|
|
|
|
"${CMAKE_SOURCE_DIR}/doc/doxygen.conf.in"
|
|
|
|
${DOXYGEN_CONF_FILE}
|
|
|
|
)
|
2015-06-30 23:04:45 +02:00
|
|
|
|
|
|
|
add_library(libsoundio_shared SHARED ${LIBSOUNDIO_SOURCES})
|
|
|
|
set_target_properties(libsoundio_shared PROPERTIES
|
|
|
|
OUTPUT_NAME soundio
|
|
|
|
SOVERSION ${LIBSOUNDIO_VERSION_MAJOR}
|
|
|
|
VERSION ${LIBSOUNDIO_VERSION}
|
|
|
|
COMPILE_FLAGS ${LIB_CFLAGS}
|
|
|
|
LINKER_LANGUAGE C
|
|
|
|
)
|
2015-09-02 21:21:41 +02:00
|
|
|
target_link_libraries(libsoundio_shared LINK_PUBLIC ${LIBSOUNDIO_LIBS})
|
2015-08-21 02:46:16 +02:00
|
|
|
install(TARGETS libsoundio_shared DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
2015-06-30 23:04:45 +02:00
|
|
|
|
|
|
|
|
2015-09-04 18:21:54 +02:00
|
|
|
if(BUILD_STATIC_LIBS)
|
|
|
|
add_library(libsoundio_static STATIC ${LIBSOUNDIO_SOURCES})
|
|
|
|
set_target_properties(libsoundio_static PROPERTIES
|
|
|
|
OUTPUT_NAME soundio
|
|
|
|
COMPILE_FLAGS ${LIB_CFLAGS}
|
|
|
|
LINKER_LANGUAGE C
|
|
|
|
)
|
|
|
|
install(TARGETS libsoundio_static DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
|
|
|
endif()
|
2015-06-30 23:04:45 +02:00
|
|
|
|
|
|
|
install(FILES
|
|
|
|
${LIBSOUNDIO_HEADERS}
|
2015-08-21 02:46:16 +02:00
|
|
|
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/soundio")
|
2015-06-30 23:04:45 +02:00
|
|
|
|
|
|
|
# Example Programs
|
|
|
|
|
2015-09-05 14:07:22 +02:00
|
|
|
if(BUILD_EXAMPLE_PROGRAMS)
|
|
|
|
add_executable(sio_sine example/sio_sine.c)
|
|
|
|
set_target_properties(sio_sine PROPERTIES
|
|
|
|
LINKER_LANGUAGE C
|
|
|
|
COMPILE_FLAGS ${EXAMPLE_CFLAGS})
|
2015-09-05 23:49:00 +02:00
|
|
|
target_link_libraries(sio_sine libsoundio_shared m)
|
2015-09-05 14:07:22 +02:00
|
|
|
install(TARGETS sio_sine DESTINATION ${CMAKE_INSTALL_BINDIR})
|
2015-07-01 10:02:44 +02:00
|
|
|
|
2015-09-05 14:07:22 +02:00
|
|
|
add_executable(sio_list_devices example/sio_list_devices.c)
|
|
|
|
set_target_properties(sio_list_devices PROPERTIES
|
|
|
|
LINKER_LANGUAGE C
|
|
|
|
COMPILE_FLAGS ${EXAMPLE_CFLAGS})
|
|
|
|
target_link_libraries(sio_list_devices libsoundio_shared)
|
|
|
|
install(TARGETS sio_list_devices DESTINATION ${CMAKE_INSTALL_BINDIR})
|
2015-06-30 23:04:45 +02:00
|
|
|
|
2015-09-05 14:07:22 +02:00
|
|
|
add_executable(sio_microphone example/sio_microphone.c)
|
|
|
|
set_target_properties(sio_microphone PROPERTIES
|
|
|
|
LINKER_LANGUAGE C
|
|
|
|
COMPILE_FLAGS ${EXAMPLE_CFLAGS})
|
|
|
|
target_link_libraries(sio_microphone libsoundio_shared)
|
|
|
|
install(TARGETS sio_microphone DESTINATION ${CMAKE_INSTALL_BINDIR})
|
2015-07-06 10:05:22 +02:00
|
|
|
|
2015-09-05 14:07:22 +02:00
|
|
|
add_executable(sio_record example/sio_record.c)
|
|
|
|
set_target_properties(sio_record PROPERTIES
|
|
|
|
LINKER_LANGUAGE C
|
|
|
|
COMPILE_FLAGS ${EXAMPLE_CFLAGS})
|
|
|
|
target_link_libraries(sio_record libsoundio_shared)
|
|
|
|
install(TARGETS sio_record DESTINATION ${CMAKE_INSTALL_BINDIR})
|
|
|
|
endif()
|
2015-08-28 08:31:33 +02:00
|
|
|
|
2015-09-05 14:07:22 +02:00
|
|
|
if(BUILD_TESTS)
|
2015-11-01 23:18:37 +01:00
|
|
|
add_executable(unit_tests "${CMAKE_SOURCE_DIR}/test/unit_tests.c" ${LIBSOUNDIO_SOURCES})
|
2015-09-05 14:07:22 +02:00
|
|
|
target_link_libraries(unit_tests LINK_PUBLIC ${LIBSOUNDIO_LIBS})
|
|
|
|
set_target_properties(unit_tests PROPERTIES
|
|
|
|
LINKER_LANGUAGE C
|
|
|
|
COMPILE_FLAGS ${TEST_CFLAGS}
|
|
|
|
LINK_FLAGS ${TEST_LDFLAGS}
|
|
|
|
)
|
2015-09-02 21:21:41 +02:00
|
|
|
|
2015-11-01 23:18:37 +01:00
|
|
|
add_executable(latency "${CMAKE_SOURCE_DIR}/test/latency.c" ${LIBSOUNDIO_SOURCES})
|
2015-09-05 23:49:00 +02:00
|
|
|
target_link_libraries(latency LINK_PUBLIC ${LIBSOUNDIO_LIBS} m)
|
2015-09-05 14:07:22 +02:00
|
|
|
set_target_properties(latency PROPERTIES
|
|
|
|
LINKER_LANGUAGE C
|
|
|
|
COMPILE_FLAGS ${LIB_CFLAGS}
|
|
|
|
)
|
2015-06-30 23:04:45 +02:00
|
|
|
|
2015-09-05 14:07:22 +02:00
|
|
|
add_executable(underflow test/underflow.c)
|
|
|
|
set_target_properties(underflow PROPERTIES
|
|
|
|
LINKER_LANGUAGE C
|
|
|
|
COMPILE_FLAGS ${EXAMPLE_CFLAGS})
|
2015-09-05 23:49:00 +02:00
|
|
|
target_link_libraries(underflow libsoundio_shared m)
|
2015-07-30 21:07:58 +02:00
|
|
|
|
2015-09-05 14:07:22 +02:00
|
|
|
add_executable(backend_disconnect_recover test/backend_disconnect_recover.c)
|
|
|
|
set_target_properties(backend_disconnect_recover PROPERTIES
|
|
|
|
LINKER_LANGUAGE C
|
|
|
|
COMPILE_FLAGS ${EXAMPLE_CFLAGS})
|
|
|
|
target_link_libraries(backend_disconnect_recover libsoundio_shared)
|
2015-08-28 05:53:28 +02:00
|
|
|
|
2015-09-05 14:07:22 +02:00
|
|
|
add_executable(overflow test/overflow.c)
|
|
|
|
set_target_properties(overflow PROPERTIES
|
|
|
|
LINKER_LANGUAGE C
|
|
|
|
COMPILE_FLAGS ${EXAMPLE_CFLAGS})
|
|
|
|
target_link_libraries(overflow libsoundio_shared)
|
2015-08-27 02:45:59 +02:00
|
|
|
|
2015-07-30 21:07:58 +02:00
|
|
|
|
2015-06-30 23:04:45 +02:00
|
|
|
|
2015-09-05 14:07:22 +02:00
|
|
|
add_custom_target(coverage
|
|
|
|
DEPENDS unit_tests
|
|
|
|
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
|
|
|
COMMAND lcov --directory . --zerocounters --rc lcov_branch_coverage=1
|
|
|
|
COMMAND ./unit_tests
|
|
|
|
COMMAND lcov --directory . --capture --output-file coverage.info --rc lcov_branch_coverage=1
|
|
|
|
COMMAND lcov --remove coverage.info '/usr/*' --output-file coverage.info.cleaned --rc lcov_branch_coverage=1
|
|
|
|
COMMAND genhtml -o coverage coverage.info.cleaned --rc lcov_branch_coverage=1
|
|
|
|
COMMAND rm coverage.info coverage.info.cleaned
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2015-06-30 23:04:45 +02:00
|
|
|
|
2015-08-26 11:40:04 +02:00
|
|
|
add_custom_target(doc
|
|
|
|
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
|
|
|
COMMAND doxygen ${DOXYGEN_CONF_FILE}
|
|
|
|
)
|
|
|
|
|
2015-06-30 23:04:45 +02:00
|
|
|
|
|
|
|
|
|
|
|
message("\n"
|
|
|
|
"Installation Summary\n"
|
|
|
|
"--------------------\n"
|
|
|
|
"* Install Directory : ${CMAKE_INSTALL_PREFIX}\n"
|
2015-08-20 02:27:05 +02:00
|
|
|
"* Build Type : ${CMAKE_BUILD_TYPE}\n"
|
2015-09-04 18:21:54 +02:00
|
|
|
"* Build static libs : ${BUILD_STATIC_LIBS}\n"
|
2015-09-05 14:07:22 +02:00
|
|
|
"* Build examples : ${BUILD_EXAMPLE_PROGRAMS}\n"
|
|
|
|
"* Build tests : ${BUILD_TESTS}\n"
|
2015-06-30 23:04:45 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
message(
|
|
|
|
"System Dependencies\n"
|
|
|
|
"-------------------\n"
|
|
|
|
"* threads : ${STATUS_THREADS}\n"
|
2015-09-01 00:51:49 +02:00
|
|
|
"* JACK (optional) : ${STATUS_JACK}\n"
|
2015-07-25 03:43:14 +02:00
|
|
|
"* PulseAudio (optional) : ${STATUS_PULSEAUDIO}\n"
|
2015-09-01 00:51:49 +02:00
|
|
|
"* ALSA (optional) : ${STATUS_ALSA}\n"
|
|
|
|
"* CoreAudio (optional) : ${STATUS_COREAUDIO}\n"
|
|
|
|
"* WASAPI (optional) : ${STATUS_WASAPI}\n"
|
2015-06-30 23:04:45 +02:00
|
|
|
)
|