Mercurial > trustbridge
changeset 1019:4f999c7821ce 0.9
Strip created executables
author | Andre Heinecke <andre.heinecke@intevation.de> |
---|---|
date | Tue, 02 Sep 2014 16:03:40 +0200 |
parents | 86181a99da76 |
children | c6ae74ac5cf9 |
files | INSTALL cinst/CMakeLists.txt ui/CMakeLists.txt |
diffstat | 3 files changed, 56 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/INSTALL Tue Sep 02 15:41:40 2014 +0200 +++ b/INSTALL Tue Sep 02 16:03:40 2014 +0200 @@ -228,6 +228,10 @@ make qtbase (optional) make curl +Add CMAKE_STRIP to the toolchain file: + echo "set(CMAKE_STRIP $MXEPATH/usr/bin/i686-w64-mingw32.static-strip)" >> \ + "$MXEPATH/usr/i686-w64-mingw32.static/share/cmake/mxe-conf.cmake" + Workaround Qt CMake Bugs: find $MXEPATH/usr/i686-w64-mingw32.static/qt5/lib/cmake -name \*.cmake | \ xargs sed -i 's/\/\([a-z]*\)\.lib/\/lib\1\.a/g'
--- a/cinst/CMakeLists.txt Tue Sep 02 15:41:40 2014 +0200 +++ b/cinst/CMakeLists.txt Tue Sep 02 16:03:40 2014 +0200 @@ -30,6 +30,19 @@ ${WIN_EXTRA_LIBS}) install(TARGETS cinst DESTINATION bin) +if (WIN32) + add_custom_command( + TARGET cinst + POST_BUILD + COMMAND ${CMAKE_STRIP} cinst.exe + ) +else() + add_custom_command( + TARGET cinst + POST_BUILD + COMMAND strip cinst + ) +endif() # ---------------------------------------------------------------------- # Mozilla nss store specific certificate installer: @@ -48,6 +61,20 @@ ${PROFILING_LIBS}) set_target_properties(mozilla PROPERTIES COMPILE_FLAGS "-std=c99") install(TARGETS mozilla DESTINATION bin) + + if (WIN32) + add_custom_command( + TARGET mozilla + POST_BUILD + COMMAND ${CMAKE_STRIP} mozilla.exe + ) + else() + add_custom_command( + TARGET mozilla + POST_BUILD + COMMAND strip mozilla + ) + endif() else() message(STATUS "WARNING: Could not find nss. Mozilla cert installer will not be build!") endif()
--- a/ui/CMakeLists.txt Tue Sep 02 15:41:40 2014 +0200 +++ b/ui/CMakeLists.txt Tue Sep 02 16:03:40 2014 +0200 @@ -223,3 +223,28 @@ configure_file(trustbridge-tray-starter.sh trustbridge-tray-starter.sh COPYONLY) install(FILES trustbridge-tray-starter.sh DESTINATION bin) endif() + +# Strip the binaries +if (WIN32) + add_custom_command( + TARGET trustbridge + POST_BUILD + COMMAND ${CMAKE_STRIP} trustbridge.exe + ) + add_custom_command( + TARGET trustbridge-admin + POST_BUILD + COMMAND ${CMAKE_STRIP} trustbridge-admin.exe + ) +else() + add_custom_command( + TARGET trustbridge + POST_BUILD + COMMAND strip trustbridge + ) + add_custom_command( + TARGET trustbridge-admin + POST_BUILD + COMMAND ${CMAKE_STRIP} trustbridge-admin + ) +endif()