This commit is contained in:
Igor Rudenko 2024-04-29 00:58:25 -04:00 committed by GitHub
commit e184e2a749
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 10 additions and 5 deletions

View File

@ -4,18 +4,23 @@ project(googerteller VERSION 1.0
DESCRIPTION "Audible feedback on Google communications"
LANGUAGES CXX C)
set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED)
set(CMAKE_CXX_STANDARD 17 CACHE STRING "The C++ standard to use")
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS ON)
message("-- Looking for Portable C Audio Library")
find_library(PCAUDIO_LIB NAMES pcaudio libpcaudio)
if (NOT PCAUDIO_LIB)
message(FATAL_ERROR "Could not find PCAUDIO_LIB using the following names: pcaudio, libpcaudio")
endif()
message("-- Looking for Portable C Audio Library - found")
add_custom_target(Work ALL DEPENDS configs.hh)
add_executable(teller teller.cc ext/lpm.c)
target_link_libraries(teller -lpcaudio -lpthread)
target_link_libraries(teller PRIVATE ${PCAUDIO_LIB} Threads::Threads)
add_executable(testrunner testrunner.cc ext/lpm.c )
target_link_libraries(testrunner -lpcaudio)
target_link_libraries(testrunner PRIVATE ${PCAUDIO_LIB})
enable_testing()
add_test(testname testrunner)