From f0f067510f8cf6a22fc69f4428889866b5ec1e36 Mon Sep 17 00:00:00 2001 From: Jared Szechy Date: Sat, 16 Jan 2021 22:49:34 -0500 Subject: [PATCH] Require threads --- CMakeLists.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 23eb3914..fd2c0d04 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,14 +22,19 @@ if(PORTAUDIO_FOUND) endif(PORTAUDIO_FOUND) if(RTLSDR_FOUND) + find_package(Threads) include_directories(SYSTEM ${RTLSDR_INCLUDE_DIRS}) - list(APPEND LIBS ${RTLSDR_LIBRARIES}) + list(APPEND LIBS ${RTLSDR_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT}) add_definitions(-DUSE_RTLSDR) endif(RTLSDR_FOUND) FILE(GLOB SRCS src/*.c src/*.cpp) FILE(GLOB HEADERS include/*.h include/*.hpp) +if(NOT RTLSDR_FOUND) + list(REMOVE_ITEM SRCS ${CMAKE_CURRENT_SOURCE_DIR}/src/rtl_sdr_fm.cpp) +endif(NOT RTLSDR_FOUND) + configure_file("src/git_ver.c.in" "${CMAKE_CURRENT_BINARY_DIR}/git_ver.c" @ONLY) list(APPEND SRCS "${CMAKE_CURRENT_BINARY_DIR}/git_ver.c")