mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
MXE: move the objcopy calls to cmakelists.txt
The objcopy calls to strip the debug symbols out of subsurface.exe need to happen before the installer is created (staged). Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
This commit is contained in:
parent
f02388d6b7
commit
bd9dad7371
2 changed files with 12 additions and 7 deletions
|
@ -422,6 +422,18 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
|||
install(CODE "execute_process(COMMAND cp -a ${_qt5Core_install_prefix}/qml/QtPositioning ${CMAKE_BINARY_DIR}/${APP_BUNDLE_DIR}/Contents/Resources/qml)")
|
||||
install(CODE "message(STATUS \"two ERRORS here about libmysqlclient and libpq not found are harmless\")")
|
||||
elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
||||
if (CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")
|
||||
if(NOT DEFINED OBJCOPY)
|
||||
set(OBJCOPY i686-w64-mingw32.shared-objcopy)
|
||||
endif()
|
||||
message(STATUS "Build type is 'RelWithDebInfo'. Creating debug symbols in a separate file.")
|
||||
add_custom_command(TARGET ${SUBSURFACE_TARGET} POST_BUILD
|
||||
COMMAND ${OBJCOPY} --only-keep-debug ${SUBSURFACE_TARGET}.exe ${SUBSURFACE_TARGET}.exe.debug
|
||||
COMMAND ${OBJCOPY} --strip-debug --strip-unneeded ${SUBSURFACE_TARGET}.exe
|
||||
COMMAND ${OBJCOPY} --add-gnu-debuglink=${SUBSURFACE_TARGET}.exe.debug ${SUBSURFACE_TARGET}.exe
|
||||
)
|
||||
endif()
|
||||
|
||||
# Windows bundling rules
|
||||
# We don't have a helpful tool like macdeployqt for Windows, so we hardcode
|
||||
# which libs we need.
|
||||
|
|
|
@ -281,10 +281,3 @@ i686-w64-mingw32.shared-cmake \
|
|||
"$BASEDIR"/subsurface
|
||||
|
||||
make $JOBS "$@"
|
||||
|
||||
OBJCOPY="i686-w64-mingw32.shared-objcopy"
|
||||
if [[ "$RELEASE_MAIN" == "RelWithDebInfo" ]] ; then
|
||||
$OBJCOPY --only-keep-debug subsurface.exe subsurface.exe.debug
|
||||
$OBJCOPY --strip-debug --strip-unneeded subsurface.exe
|
||||
$OBJCOPY --add-gnu-debuglink=subsurface.exe.debug subsurface.exe
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue