From 084f7ac317a6cf300cac185da1fe30cb0e68820a Mon Sep 17 00:00:00 2001 From: pionere Date: Sun, 26 Nov 2023 12:03:41 +0100 Subject: [PATCH] strip the patcher --- CMakeLists.txt | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d2e0dfcc4e2..f5eaade650a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -627,14 +627,6 @@ else() ${BIN_SOURCES}) endif() -if(CMAKE_STRIP AND NOT DISABLE_STRIP) - add_custom_command( - TARGET ${BIN_TARGET} POST_BUILD - DEPENDS ${BIN_TARGET} - COMMAND $<$,$>:${CMAKE_STRIP}> - ARGS $) -endif() - if(USE_PATCH) set(DEVIL_PATCHER devil_patcher) set(devil_patcher_SRCS @@ -756,6 +748,22 @@ if(USE_PATCH) ${CMAKE_BINARY_DIR}) endif() +if(CMAKE_STRIP AND NOT DISABLE_STRIP) + add_custom_command( + TARGET ${BIN_TARGET} POST_BUILD + DEPENDS ${BIN_TARGET} + COMMAND $<$,$>:${CMAKE_STRIP}> + ARGS $) + + if(USE_PATCH) + add_custom_command( + TARGET ${DEVIL_PATCHER} POST_BUILD + DEPENDS ${DEVIL_PATCHER} + COMMAND $<$,$>:${CMAKE_STRIP}> + ARGS $) + endif() +endif() + # Use file GENERATE instead of configure_file because configure_file # does not support generator expressions. get_property(is_multi_config GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)