Commit 280c9057c9e7758bd48c279f29d81565a7e5592e

Authored by Jay Berkenbilt
1 parent ef24a415

Strip DLLs with mingw in Release mode

Showing 1 changed file with 2 additions and 0 deletions
libqpdf/CMakeLists.txt
@@ -472,6 +472,8 @@ if(BUILD_SHARED_LIBS) @@ -472,6 +472,8 @@ if(BUILD_SHARED_LIBS)
472 # Reference: Platform/Windows-GNU.cmake in the cmake installation 472 # Reference: Platform/Windows-GNU.cmake in the cmake installation
473 set(CMAKE_SHARED_LIBRARY_PREFIX "") # libqpdf$v.dll -> qpdf$v.dll 473 set(CMAKE_SHARED_LIBRARY_PREFIX "") # libqpdf$v.dll -> qpdf$v.dll
474 set(CMAKE_IMPORT_LIBRARY_SUFFIX ".a") # libqpdf.dll.a -> libqpdf.a 474 set(CMAKE_IMPORT_LIBRARY_SUFFIX ".a") # libqpdf.dll.a -> libqpdf.a
  475 + # Ensure the DLLs are striped in Release mode.
  476 + set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -s")
475 endif() 477 endif()
476 if(MSVC) 478 if(MSVC)
477 # Avoid linker warning from mixing libraries built with /MT and /MD. 479 # Avoid linker warning from mixing libraries built with /MT and /MD.