From bc6e04628bb3c0d2fe220f06752e4b986292b025 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Simonis?= <simonisfrederic@gmail.com>
Date: Mon, 9 Aug 2021 15:52:55 +0200
Subject: [PATCH] Fix linker flags using clang

---
 scribus/CMakeLists.txt | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/scribus/CMakeLists.txt b/scribus/CMakeLists.txt
index 03b4ef179..943af231a 100644
--- a/scribus/CMakeLists.txt
+++ b/scribus/CMakeLists.txt
@@ -762,13 +762,15 @@ if (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" OR CMAKE_SYSTEM_NAME STREQUAL "OpenBSD"
 # Should fix bug 6897 .
 	set_target_properties(${EXE_NAME} PROPERTIES LINK_FLAGS -Wl,-E)
 endif ()
-if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND NOT WIN32)
+
+if ((CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang") AND NOT WIN32)
 # Use the -E / --export-dynamic flag to ensure that symbols in the Scribus
 # binary are in the public symbol table for plugins. The symbols must also
 # be set as SCRIBUS_API if we're building with -fvisibility=hidden .
 # Should fix bug 6897 .
 	set_target_properties(${EXE_NAME} PROPERTIES LINK_FLAGS -Wl,-E)
 endif ()
+
 ##
 
 
-- 
2.32.0

