From 1ad9079d900a0c3c7c4083653ef78858ae7ffaba Mon Sep 17 00:00:00 2001 From: Lephenixnoir Date: Sat, 10 Apr 2021 07:42:31 +0200 Subject: [PATCH] fxg1a, mkg3a: change argument order for musl compatibility The musl getopt does not swap arguments and requires every option to precede every non-option. Do that in the CMake functions generate_g1a() and generate_g3a(). --- fxsdk/cmake/GenerateG1A.cmake | 2 +- fxsdk/cmake/GenerateG3A.cmake | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fxsdk/cmake/GenerateG1A.cmake b/fxsdk/cmake/GenerateG1A.cmake index 7276bf3..a2f3451 100644 --- a/fxsdk/cmake/GenerateG1A.cmake +++ b/fxsdk/cmake/GenerateG1A.cmake @@ -40,7 +40,7 @@ function(generate_g1a) add_custom_command( TARGET "${G1A_TARGET}" POST_BUILD COMMAND "${OBJCOPY}" -O binary -R .bss -R .gint_bss "${G1A_TARGET}" "${G1A_TARGET}.bin" - COMMAND fxg1a "${G1A_TARGET}.bin" ${FXG1A_ARGS} -o "${G1A_OUTPUT}" + COMMAND fxg1a ${FXG1A_ARGS} -o "${G1A_OUTPUT}" "${G1A_TARGET}.bin" WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" ) if(DEFINED G1A_ICON) diff --git a/fxsdk/cmake/GenerateG3A.cmake b/fxsdk/cmake/GenerateG3A.cmake index 5888f59..8e888e8 100644 --- a/fxsdk/cmake/GenerateG3A.cmake +++ b/fxsdk/cmake/GenerateG3A.cmake @@ -51,7 +51,7 @@ function(generate_g3a) add_custom_command( TARGET "${G3A_TARGET}" POST_BUILD COMMAND "${OBJCOPY}" -O binary -R .bss -R .gint_bss "${G3A_TARGET}" "${G3A_TARGET}.bin" - COMMAND mkg3a "${G3A_TARGET}.bin" ${MKG3A_ARGS} "${G3A_OUTPUT}" + COMMAND mkg3a ${MKG3A_ARGS} "${G3A_TARGET}.bin" "${G3A_OUTPUT}" WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" ) if(DEFINED G3A_ICONS)