File: BuildSamplerate.cmake

package info (click to toggle)
freedv 1.8.11-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 26,348 kB
  • sloc: cpp: 15,418; ansic: 5,929; sh: 266; python: 42; makefile: 12
file content (22 lines) | stat: -rw-r--r-- 682 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
set(SAMPLERATE_VERSION "0.2.2")

include(FetchContent)
FetchContent_Declare(
    samplerate
    GIT_REPOSITORY https://github.com/libsndfile/libsamplerate.git
    GIT_SHALLOW    TRUE
    GIT_PROGRESS   TRUE
    GIT_TAG        0.2.2
)

FetchContent_GetProperties(samplerate)
if(NOT samplerate_POPULATED)
  FetchContent_Populate(samplerate)
  add_subdirectory(${samplerate_SOURCE_DIR} ${samplerate_BINARY_DIR} EXCLUDE_FROM_ALL)
  list(APPEND FREEDV_PACKAGE_SEARCH_PATHS ${samplerate_BINARY_DIR}/src)
endif()

list(APPEND FREEDV_LINK_LIBS samplerate)

target_include_directories(samplerate BEFORE PRIVATE ${samplerate_BINARY_DIR})
include_directories(${samplerate_SOURCE_DIR}/include)