From d23645e02f0ef668635616874edf1a36944b7c79 Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Mon, 11 Jan 2021 03:18:30 +1000 Subject: [PATCH] CMake: Fix Linux build --- dep/CMakeLists.txt | 3 +++ dep/libsamplerate/CMakeLists.txt | 24 ------------------------ src/common/CMakeLists.txt | 2 +- 3 files changed, 4 insertions(+), 25 deletions(-) diff --git a/dep/CMakeLists.txt b/dep/CMakeLists.txt index a23cc18a0..5a1bcc838 100644 --- a/dep/CMakeLists.txt +++ b/dep/CMakeLists.txt @@ -16,6 +16,9 @@ add_subdirectory(imgui) add_subdirectory(simpleini) add_subdirectory(tinyxml2) +set(LIBSAMPLERATE_ENABLE_SINC_BEST_CONVERTER OFF) +add_subdirectory(libsamplerate) + if(ENABLE_DISCORD_PRESENCE) add_subdirectory(discord-rpc) endif() diff --git a/dep/libsamplerate/CMakeLists.txt b/dep/libsamplerate/CMakeLists.txt index 68cbad148..f89b25484 100644 --- a/dep/libsamplerate/CMakeLists.txt +++ b/dep/libsamplerate/CMakeLists.txt @@ -92,36 +92,12 @@ endif() check_include_file(stdbool.h HAVE_STDBOOL_H) check_include_file(unistd.h HAVE_UNISTD_H) -# For examples and tests - -if(LIBSAMPLERATE_EXAMPLES OR BUILD_TESTING) - find_package(SndFile) - set(HAVE_SNDFILE ${SndFile_FOUND}) -endif() - # SampleRate library add_subdirectory(src) -# Tests - -# BUILD_TESTING is declared by CTest module and is ON by default -if(BUILD_TESTING) - add_subdirectory(tests) -endif() - -# Examples - -if(LIBSAMPLERATE_EXAMPLES) - add_subdirectory(examples) -endif() - configure_file(config.h.cmake config.h) -if(LIBSAMPLERATE_INSTALL) - add_subdirectory(docs) -endif() - # Packaging support # See https://cmake.org/cmake/help/v3.12/release/3.12.html#cpack diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt index 777553dbc..108f7b685 100644 --- a/src/common/CMakeLists.txt +++ b/src/common/CMakeLists.txt @@ -101,7 +101,7 @@ add_library(common target_include_directories(common PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/..") target_include_directories(common PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/..") -target_link_libraries(common PRIVATE glad libcue stb Threads::Threads libchdr glslang vulkan-loader zlib minizip) +target_link_libraries(common PRIVATE glad libcue stb Threads::Threads libchdr glslang vulkan-loader zlib minizip samplerate) if(WIN32) target_sources(common PRIVATE