mirror of
https://github.com/clangen/musikcube.git
synced 2024-12-26 00:16:09 +00:00
Fixed bug where out of source tree builds were not getting stripped
properly.
This commit is contained in:
parent
6906826d52
commit
836120f029
@ -374,8 +374,8 @@ add_custom_command(TARGET postbuild POST_BUILD COMMAND cmake .)
|
||||
# strip binaries in release mode
|
||||
if (CMAKE_BUILD_TYPE MATCHES Release)
|
||||
if ((NOT DEFINED DISABLE_STRIP) OR (NOT ${DISABLE_STRIP} MATCHES "true"))
|
||||
message(STATUS "[build] binary stripping enabled")
|
||||
add_custom_command(TARGET postbuild POST_BUILD COMMAND "${CMAKE_SOURCE_DIR}/strip-nix.sh")
|
||||
message(STATUS "[build] binary stripping enabled for ${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
add_custom_command(TARGET postbuild POST_BUILD COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/strip-nix.sh" ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
else()
|
||||
message(STATUS "[build] DISABLE_STRIP=true, *NOT* stripping binaries.")
|
||||
endif()
|
||||
|
13
strip-nix.sh
13
strip-nix.sh
@ -1,4 +1,11 @@
|
||||
#!/bin/sh
|
||||
strip ./bin/musikcube
|
||||
strip ./bin/musikcubed
|
||||
find ./bin/ -name "*.so" -exec strip "{}" \; 2> /dev/null
|
||||
DIR=$1
|
||||
if [ -z "$DIR" ]; then
|
||||
echo "[strip] directory not specified, using current working directory"
|
||||
DIR=`pwd`
|
||||
fi
|
||||
echo "[strip] resolved directory: ${DIR}"
|
||||
strip "$DIR/bin/musikcube"
|
||||
strip "$DIR/bin/musikcubed"
|
||||
find "$DIR/bin/" -name "*.so" -exec strip "{}" \; 2> /dev/null
|
||||
echo "[strip] finished"
|
||||
|
Loading…
Reference in New Issue
Block a user