From 70915592d0721dccb84f534eb1adc1f7228d874f Mon Sep 17 00:00:00 2001 From: Johannes Lorenz Date: Fri, 6 Sep 2024 23:07:57 +0200 Subject: [PATCH] pkgconfig --- CMakeLists.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ca7c19b..8740ada 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,7 +25,7 @@ else() set(GUI_FOUND FALSE) endif(FLTK_FOUND) -if(MSVC) +if(MSVC OR APPLE) find_package(liblo) if(liblo_FOUND) set(LIBLO_FOUND TRUE) @@ -174,10 +174,10 @@ macro(maketestcpp fname) target_link_libraries(${fname} PRIVATE rtosc-cpp rtosc) #add_test(memcheck_${fname} valgrind --leak-check=full --show-reachable=yes --error-exitcode=1 ./${fname}) endmacro(maketestcpp) -if(WIN32) - set(RTOSC_LIBLO_LIBRARIES "liblo::liblo") -else() +if(PKG_CONFIG_FOUND) set(RTOSC_LIBLO_LIBRARIES "${LIBLO_LIBRARIES}") +else() + set(RTOSC_LIBLO_LIBRARIES "liblo::liblo") endif() maketest(rtosc-time)