aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2023-05-21 01:50:43 +0200
committerJay Berkenbilt <ejb@ql.org>2023-05-21 01:51:12 +0200
commit280c9057c9e7758bd48c279f29d81565a7e5592e (patch)
tree185919fa586767fd8bdbddb7a6a7b40ad8128036
parentef24a4151b2456a392fde64a3493b06eadda6d36 (diff)
downloadqpdf-280c9057c9e7758bd48c279f29d81565a7e5592e.tar.zst
Strip DLLs with mingw in Release mode
-rw-r--r--libqpdf/CMakeLists.txt2
1 files changed, 2 insertions, 0 deletions
diff --git a/libqpdf/CMakeLists.txt b/libqpdf/CMakeLists.txt
index 623e05d3..fbe85cf9 100644
--- a/libqpdf/CMakeLists.txt
+++ b/libqpdf/CMakeLists.txt
@@ -472,6 +472,8 @@ if(BUILD_SHARED_LIBS)
# Reference: Platform/Windows-GNU.cmake in the cmake installation
set(CMAKE_SHARED_LIBRARY_PREFIX "") # libqpdf$v.dll -> qpdf$v.dll
set(CMAKE_IMPORT_LIBRARY_SUFFIX ".a") # libqpdf.dll.a -> libqpdf.a
+ # Ensure the DLLs are striped in Release mode.
+ set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -s")
endif()
if(MSVC)
# Avoid linker warning from mixing libraries built with /MT and /MD.