CMakeLists.txt 1.04 KB
Newer Older
moto's avatar
moto committed
1
set(TORCHAUDIO_THIRD_PARTIES "")
moto's avatar
moto committed
2

moto's avatar
moto committed
3
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden")
moto's avatar
moto committed
4

moto's avatar
moto committed
5
6
7
8
################################################################################
# sox
################################################################################
add_library(libsox INTERFACE)
moto's avatar
moto committed
9
if (BUILD_SOX)
10
  add_subdirectory(sox)
moto's avatar
moto committed
11
12
13
14
15
16
  target_include_directories(libsox INTERFACE ${SOX_INCLUDE_DIR})
  target_link_libraries(libsox INTERFACE ${SOX_LIBRARIES})
else()
  # If not building and linking libsox statically, then we expect that
  # sox library and header are found in search path
  target_link_libraries(libsox INTERFACE -lsox)
moto's avatar
moto committed
17
endif()
moto's avatar
moto committed
18
list(APPEND TORCHAUDIO_THIRD_PARTIES libsox)
19

moto's avatar
moto committed
20
21
22
23
################################################################################
# transducer
################################################################################
if (BUILD_TRANSDUCER)
24
  add_subdirectory(transducer)
moto's avatar
moto committed
25
  list(APPEND TORCHAUDIO_THIRD_PARTIES warprnnt)
moto's avatar
moto committed
26
endif()
moto's avatar
moto committed
27
28

set_property(GLOBAL PROPERTY TORCHAUDIO_THIRD_PARTIES "${TORCHAUDIO_THIRD_PARTIES}")