diff options
author | Přemysl Eric Janouch <p@janouch.name> | 2021-11-07 15:37:21 +0100 |
---|---|---|
committer | Přemysl Eric Janouch <p@janouch.name> | 2021-11-07 15:37:21 +0100 |
commit | 782a9a5977bd5f2101e8808b94d659fe52e2490a (patch) | |
tree | 64d12f190166a9267187bf5efb01c985bba2b7ff /CMakeLists.txt | |
parent | 34f86651f6220038c0ee07d3f422a52d9b081f02 (diff) | |
download | liberty-782a9a5977bd5f2101e8808b94d659fe52e2490a.tar.gz liberty-782a9a5977bd5f2101e8808b94d659fe52e2490a.tar.xz liberty-782a9a5977bd5f2101e8808b94d659fe52e2490a.zip |
Import libpulse poller integration, add tests
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 1527da9..fa996bf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ project (liberty C) -cmake_minimum_required (VERSION 2.8.5) +cmake_minimum_required (VERSION 2.8.12) # Moar warnings if ("${CMAKE_C_COMPILER_ID}" MATCHES "GNU" OR CMAKE_COMPILER_IS_GNUCC) @@ -36,7 +36,17 @@ endforeach () # Build some unit tests include_directories (${PROJECT_SOURCE_DIR}) enable_testing () -foreach (name liberty proto) +set (tests liberty proto) + +pkg_check_modules (libpulse libpulse) +if (libpulse_FOUND) + list (APPEND tests pulse) + list (APPEND common_libraries ${libpulse_LIBRARIES}) + include_directories (${libpulse_INCLUDE_DIRS}) + link_directories (${libpulse_LIBRARY_DIRS}) +endif () + +foreach (name ${tests}) add_executable (test-${name} tests/${name}.c ${common_sources}) add_threads (test-${name}) target_link_libraries (test-${name} ${common_libraries}) |