From 7059295cb30d9a46178fb67af018a6a18c7a1841 Mon Sep 17 00:00:00 2001 From: William JCM Date: Fri, 3 Dec 2021 00:14:22 +0100 Subject: [PATCH] Strip the release executable. For *some* reason, there's debug info in one of the MinGW-w64 libs, which account for roughly half the bloat of the release exe. --- src/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index a479bae..a0087a4 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -153,6 +153,10 @@ endif() target_link_options(MassBuilderSaveTool PRIVATE -static -static-libgcc -static-libstdc++) +if(CMAKE_BUILD_TYPE STREQUAL Release) + target_link_options(MassBuilderSaveTool PRIVATE -Wl,-S) +endif() + target_link_libraries(MassBuilderSaveTool PRIVATE Corrade::Containers Corrade::Utility