From c04f74c1d9632fa82982bf2805ff056cdcdc50e5 Mon Sep 17 00:00:00 2001 From: Michael Maltese Date: Wed, 26 Oct 2016 23:48:42 -0700 Subject: [PATCH 1/2] CMake: CMAKE_BINARY_DIR -> libsoundio_BINARY_DIR - Consistent with usage of `libsoundio_SOURCE_DIR` - Makes it easier to include inside other projects. I haven't encountered any actual issues with the way it is now, but it was misleading while I was debugging a different issue related to being used as a subproject. --- CMakeLists.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f70bbd7..ce04ab0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -148,7 +148,7 @@ set(LIBSOUNDIO_SOURCES "${libsoundio_SOURCE_DIR}/src/ring_buffer.c" ) -set(CONFIGURE_OUT_FILE "${CMAKE_BINARY_DIR}/config.h") +set(CONFIGURE_OUT_FILE "${libsoundio_BINARY_DIR}/config.h") set(LIBSOUNDIO_HEADERS "${libsoundio_SOURCE_DIR}/soundio/soundio.h" "${libsoundio_SOURCE_DIR}/soundio/endian.h" @@ -182,7 +182,7 @@ endif() include_directories( ${libsoundio_SOURCE_DIR} - ${CMAKE_BINARY_DIR} + ${libsoundio_BINARY_DIR} "${libsoundio_SOURCE_DIR}/test" "${libsoundio_SOURCE_DIR}/src" ) @@ -217,7 +217,7 @@ configure_file( "${libsoundio_SOURCE_DIR}/src/config.h.in" ${CONFIGURE_OUT_FILE} ) -set(DOXYGEN_CONF_FILE "${CMAKE_BINARY_DIR}/doxygen.conf") +set(DOXYGEN_CONF_FILE "${libsoundio_BINARY_DIR}/doxygen.conf") configure_file( "${libsoundio_SOURCE_DIR}/doc/doxygen.conf.in" ${DOXYGEN_CONF_FILE} @@ -348,7 +348,7 @@ if(BUILD_TESTS) add_custom_target(coverage DEPENDS unit_tests - WORKING_DIRECTORY ${CMAKE_BINARY_DIR} + WORKING_DIRECTORY ${libsoundio_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 @@ -360,7 +360,7 @@ endif() add_custom_target(doc - WORKING_DIRECTORY ${CMAKE_BINARY_DIR} + WORKING_DIRECTORY ${libsoundio_BINARY_DIR} COMMAND doxygen ${DOXYGEN_CONF_FILE} ) From 8af2379cf7bbc23bce318dadff1035e0ad6f3eb2 Mon Sep 17 00:00:00 2001 From: Anthony Pesch Date: Thu, 22 Dec 2016 19:43:14 -0800 Subject: [PATCH 2/2] build: fix detection of unsuitable JACK library --- cmake/FindJACK.cmake | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cmake/FindJACK.cmake b/cmake/FindJACK.cmake index 3a1d9de..9043bd6 100644 --- a/cmake/FindJACK.cmake +++ b/cmake/FindJACK.cmake @@ -10,7 +10,10 @@ find_path(JACK_INCLUDE_DIR NAMES jack/jack.h) find_library(JACK_LIBRARY NAMES jack) +include(CheckLibraryExists) +check_library_exists(jack "jack_set_port_rename_callback" "${JACK_LIBRARY}" HAVE_jack_set_port_rename_callback) + include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(JACK DEFAULT_MSG JACK_LIBRARY JACK_INCLUDE_DIR) +find_package_handle_standard_args(JACK DEFAULT_MSG JACK_LIBRARY JACK_INCLUDE_DIR HAVE_jack_set_port_rename_callback) mark_as_advanced(JACK_INCLUDE_DIR JACK_LIBRARY)