From 206c17f21207d1e35dbaf15421073500236c6480 Mon Sep 17 00:00:00 2001 From: joaolsd Date: Mon, 22 Aug 2022 16:42:43 +0200 Subject: [PATCH] Changes to make it compile on Macos (with additonal libraru installed) --- CMakeLists.txt | 14 +++++++++++++- README.md | 6 ++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7f6ce4d..9300313 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,8 +20,20 @@ set(CMAKE_CXX_EXTENSIONS ON) #target_include_directories(support PUBLIC ext/powerblog/ext/simplesocket ext/powerblog/ext ext/fmt-7.1.3/include/) #target_link_libraries(support PUBLIC -lh2o-evloop -lssl -lcrypto Threads::Threads) +add_library(pcaudiolib SHARED IMPORTED) add_executable(teller teller.cc ) -target_link_libraries(teller -lpcaudio -lpthread) +if (APPLE) + set_target_properties(pcaudiolib PROPERTIES + IMPORTED_LOCATION "/usr/local/lib/libpcaudio.dylib" + INTERFACE_INCLUDE_DIRECTORIES "/usr/local/include" + ) + target_include_directories(teller PUBLIC /usr/local/include/) +else() + set_target_properties(pcaudiolib PROPERTIES + IMPORTED_LOCATION "/usr/local/lib/libpcaudio.so" + ) +endif() +target_link_libraries(teller pcaudiolib -lpthread) #enable_testing() #add_test(testname testrunner) diff --git a/README.md b/README.md index 043a9b7..bdf71fc 100644 --- a/README.md +++ b/README.md @@ -33,3 +33,9 @@ support page](https://support.google.com/a/answer/10026322?hl=en). Note that this splits out Google services and Google cloud user IP addresses. + +## Macos +You will need to install the pcaudio library: + https://github.com/espeak-ng/pcaudiolib#mac-os +In turn this needs automake installed (from xcode or brew). With that it is standard install +WIth libpcaudio in place, follow instructions above. \ No newline at end of file