Ensure we actually strip binaries as part of the release build process.

This commit is contained in:
casey langen 2019-10-27 12:55:48 -07:00
parent b0aab217ac
commit f6dda3d554
2 changed files with 7 additions and 1 deletions

View File

@ -328,3 +328,9 @@ endif()
# they don't yet exist!
add_custom_target(postbuild ALL DEPENDS musikcube musikcubed)
add_custom_command(TARGET postbuild POST_BUILD COMMAND cmake .)
# strip binaries in release mode
if (CMAKE_BUILD_TYPE MATCHES Release)
message(STATUS "stripping binaries...")
add_custom_command(TARGET postbuild POST_BUILD COMMAND ./strip-nix.sh)
endif()

View File

@ -1,4 +1,4 @@
#!/bin/sh
strip ./bin/musikcube
strip ./bin/musikcubed
find . -name "*.so" -exec strip "{}" \; 2> /dev/null
find ./bin/ -name "*.so" -exec strip "{}" \; 2> /dev/null