CMake: Fix Linux build

This commit is contained in:
Connor McLaughlin 2021-01-11 03:18:30 +10:00
parent ce965e89ca
commit d23645e02f
3 changed files with 4 additions and 25 deletions

View File

@ -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()

View File

@ -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

View File

@ -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