From ffed1df4fc031c1d036bad51fce8d3342dd3283c Mon Sep 17 00:00:00 2001 From: Cvolton <cvolton@cvolton.eu> Date: Wed, 13 Dec 2023 01:01:58 +0100 Subject: [PATCH] Fix Android strip not being run without Geode CLI --- cmake/GeodeFile.cmake | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/cmake/GeodeFile.cmake b/cmake/GeodeFile.cmake index b11d5e9c..d3a7d553 100644 --- a/cmake/GeodeFile.cmake +++ b/cmake/GeodeFile.cmake @@ -51,6 +51,17 @@ function(setup_geode_mod proname) # Link Geode to the mod target_link_libraries(${proname} geode-sdk) + if (ANDROID) + if (CMAKE_BUILD_TYPE STREQUAL "Release") + add_custom_command( + TARGET "${PROJECT_NAME}" POST_BUILD + DEPENDS "${PROJECT_NAME}" + COMMAND $<$<CONFIG:release>:${CMAKE_STRIP}> + ARGS -S $<TARGET_FILE:${PROJECT_NAME}> + ) + endif() + endif() + if (GEODE_DISABLE_CLI_CALLS) message("Skipping setting up geode mod ${proname}") return() @@ -207,17 +218,6 @@ function(setup_geode_mod proname) set_target_properties(${proname} PROPERTIES PREFIX "") set_target_properties(${proname} PROPERTIES OUTPUT_NAME ${MOD_ID}) - if (ANDROID) - if (CMAKE_BUILD_TYPE STREQUAL "Release") - add_custom_command( - TARGET "${PROJECT_NAME}" POST_BUILD - DEPENDS "${PROJECT_NAME}" - COMMAND $<$<CONFIG:release>:${CMAKE_STRIP}> - ARGS -S $<TARGET_FILE:${PROJECT_NAME}> - ) - endif() - endif() - endfunction() function(create_geode_file proname)