Open TanerH opened 4 years ago
@TanerH Want to put this in a PR?
@TanerH Ping... if you end up having a moment... or not if you don't think it's useful anymore :)
The change suggested by @TanerH fixed the issue with cmake not finding the libacars library, but I got compile errors when the script was compiling outacars. It couldn't find the header files for the library.
I fixed it by adding:
if(LIBACARS2)
message ( STATUS "Using libacars-2")
add_definitions(-DHAVE_LIBACARS )
target_link_libraries( vdlm2dec acars-2)
target_include_directories( vdlm2dec PUBLIC "/usr/local/include/libacars-2")
else()
find_library(LIBACARS acars)
if(LIBACARS)
message ( STATUS "Using libacars")
add_definitions(-DHAVE_LIBACARS )
target_link_libraries( vdlm2dec acars)
target_include_directories( vdlm2dec PUBLIC "/usr/local/include/libacars")
There might be a better way to do this, but this worked for me.
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)