This repository was archived by the owner on Oct 5, 2025. It is now read-only.
Description The CMakeLists.txt is only looking for libacars, and not libacars-2 (which is the latest from https://github.com/szpajder/libacars )
This diff will check for acars-2, first, and then acars, before giving up on that library.
(Forgive the indenting, please adjust as you'd like)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c619ab7..b86ea58 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -5,13 +5,20 @@ add_compile_options(-Ofast -march=native )
add_executable(vdlm2dec cJSON.c crc.c d8psk.c label.c main.c outacars.c out.c outxid.c rs.c vdlm2.c viterbi.c )
-find_library(LIBACARS acars)
-if(LIBACARS)
-message ( STATUS "Using libacars")
-add_definitions(-DHAVE_LIBACARS )
-target_link_libraries( vdlm2dec acars)
+find_library(LIBACARS2 acars-2)
+if(LIBACARS2)
+ message ( STATUS "Using libacars-2")
+ add_definitions(-DHAVE_LIBACARS )
+ target_link_libraries( vdlm2dec acars-2)
else()
-message ( STATUS "Not using libacars")
+ find_library(LIBACARS acars)
+ if(LIBACARS)
+ message ( STATUS "Using libacars")
+ add_definitions(-DHAVE_LIBACARS )
+ target_link_libraries( vdlm2dec acars)
+ else()
+ message ( STATUS "Not using libacars (v1 or v2)")
+ endif()
endif()
option(rtl "Compiling for rtl sdr" )
Reactions are currently unavailable