Skip to content

Commit

Permalink
CMake polishing
Browse files Browse the repository at this point in the history
  • Loading branch information
hextriclosan committed Aug 23, 2022
1 parent 98cb1d3 commit 198fe83
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,15 @@ project(googerteller VERSION 1.0
DESCRIPTION "Audible feedback on Google communications"
LANGUAGES CXX)

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_library(support STATIC ext/powerblog/h2o-pp.cc
# ext/powerblog/ext/simplesocket/swrappers.cc
Expand All @@ -21,7 +26,8 @@ set(CMAKE_CXX_EXTENSIONS ON)
#target_link_libraries(support PUBLIC -lh2o-evloop -lssl -lcrypto Threads::Threads)

add_executable(teller teller.cc )
target_link_libraries(teller -lpcaudio -lpthread)
target_link_libraries(teller PRIVATE ${PCAUDIO_LIB} Threads::Threads)
target_compile_features(teller PRIVATE cxx_std_17)

#enable_testing()
#add_test(testname testrunner)

0 comments on commit 198fe83

Please sign in to comment.