From 5c5d280dd547958a37824809b7a038efbb3aee3b Mon Sep 17 00:00:00 2001
From: Nadia Holmquist Pedersen <nadia@nhp.sh>
Date: Sun, 10 May 2020 23:09:17 +0200
Subject: Add -flto as link flag, also fix missing <string> include in main.cpp
 causing a build failure with gcc10

---
 src/libui_sdl/libui/unix/CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'src/libui_sdl/libui/unix/CMakeLists.txt')

diff --git a/src/libui_sdl/libui/unix/CMakeLists.txt b/src/libui_sdl/libui/unix/CMakeLists.txt
index c69081e..39f6c0a 100644
--- a/src/libui_sdl/libui/unix/CMakeLists.txt
+++ b/src/libui_sdl/libui/unix/CMakeLists.txt
@@ -65,7 +65,7 @@ macro(_handle_static)
 		OUTPUT ${_oname}
 		DEPENDS ${_LIBUINAME}
 		COMMAND
-			ld -r --whole-archive ${_aname} -o ${_oname}
+			${CMAKE_LINKER} -r --whole-archive ${_aname} -o ${_oname}
 		COMMAND
 			objcopy --localize-hidden ${_oname}
 		COMMENT "Removing hidden symbols")
-- 
cgit v1.2.3