From c9bee083e0baea16eb91af117033d0ff3fd290b1 Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine Date: Sun, 10 Apr 2022 19:24:03 +0200 Subject: [PATCH] package/belr: fix BR2_SHARED_STATIC_LIBS build Fix the following build failure with BR2_SHARED_STATIC_LIBS: CMake Error at src/CMakeLists.txt:56 (add_library): add_library cannot create target "belr" because another target with the same name already exists. The existing target is a static library created in source directory Fixes: - http://autobuild.buildroot.org/results/d1ef96c8f370b5a522985c37f1681dd10bbc15bb Signed-off-by: Fabrice Fontaine [Peter: simplify/add comment explaining why] Signed-off-by: Peter Korsgaard --- package/belr/belr.mk | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/package/belr/belr.mk b/package/belr/belr.mk index f243830a85..26b949734f 100644 --- a/package/belr/belr.mk +++ b/package/belr/belr.mk @@ -17,9 +17,8 @@ BELR_CONF_OPTS = \ ifeq ($(BR2_STATIC_LIBS),y) BELR_CONF_OPTS += -DENABLE_SHARED=OFF -DENABLE_STATIC=ON -else ifeq ($(BR2_SHARED_STATIC_LIBS),y) -BELR_CONF_OPTS += -DENABLE_SHARED=ON -DENABLE_STATIC=ON -else ifeq ($(BR2_SHARED_LIBS),y) +else +# cannot build static and shared together BELR_CONF_OPTS += -DENABLE_SHARED=ON -DENABLE_STATIC=OFF endif