From 29a657bc77337072fc140cfdf27d4797f8f0d673 Mon Sep 17 00:00:00 2001 From: Paul Licameli Date: Fri, 2 Oct 2020 18:05:30 -0400 Subject: [PATCH] CMake function addlib can be called multiply for the same library --- cmake-proxies/cmake-modules/AudacityFunctions.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmake-proxies/cmake-modules/AudacityFunctions.cmake b/cmake-proxies/cmake-modules/AudacityFunctions.cmake index 98a427456..f1e0940dc 100644 --- a/cmake-proxies/cmake-modules/AudacityFunctions.cmake +++ b/cmake-proxies/cmake-modules/AudacityFunctions.cmake @@ -443,6 +443,10 @@ function( addlib dir name symbol required check ) # Let the Audacity target know that this library will be used set( USE_${symbol} ON CACHE INTERNAL "" FORCE ) + if ( TARGET "${TARGET}" ) + return() + endif() + message( STATUS "========== Configuring ${name} ==========" ) # Check for the system package(s) if the user prefers it