1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-24 03:47:18 +02:00

CMakeLists.txt: strip on package if no debuginfo is requested

It significantly reduces size of the executable
This commit is contained in:
Konstantin 2023-01-25 18:09:36 +03:00
parent d62d5a83ab
commit 30784477e0

View File

@ -659,6 +659,12 @@ if(WIN32)
endif()
set(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS " Delete \\\"$DESKTOP\\\\VCMI.lnk\\\" ")
# Strip MinGW CPack target if build configuration without debug info
if(MINGW)
if(NOT (CMAKE_BUILD_TYPE STREQUAL "Debug") OR (CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo"))
set(CPACK_STRIP_FILES ON)
endif()
endif()
# set the install/unistall icon used for the installer itself
# There is a bug in NSI that does not handle full unix paths properly.
set(CPACK_NSIS_MUI_ICON "${CMAKE_CURRENT_SOURCE_DIR}/client\\\\vcmi.ico")