Fix error when building with -DTINYALSA_BUILD_UTILS=OFF

This commit is contained in:
Riff, Eric 2020-09-16 21:38:54 -03:00
parent 6a4cab794c
commit 7310073cb7

View File

@ -69,7 +69,10 @@ foreach(UTIL IN LISTS TINYALSA_UTILS)
add_executable("${UTIL}" "utils/${UTIL}.c")
target_link_libraries("${UTIL}" PRIVATE "tinyalsa")
endforeach()
target_link_libraries("tinywavinfo" PRIVATE m)
if(TINYALSA_BUILD_UTILS)
target_link_libraries("tinywavinfo" PRIVATE m)
endif()
# Add C warning flags
include(CheckCCompilerFlag)