cmake: fix replacement pattern that finds sh-elf-objcopy

The previous one would fail if "gcc" was in the install path.
This commit is contained in:
Lephenixnoir 2021-04-17 15:59:35 +02:00
parent 42bc49b89a
commit d09ad9dd17
Signed by: Lephenixnoir
GPG Key ID: 1BBA026E13FC0495
1 changed files with 1 additions and 1 deletions

View File

@ -35,7 +35,7 @@ function(generate_g1a)
list(APPEND FXG1A_ARGS "-i" "${G1A_ICON}")
endif()
string(REPLACE "gcc" "objcopy" OBJCOPY "${CMAKE_C_COMPILER}")
string(REGEX REPLACE "sh-elf-gcc$" "sh-elf-objcopy" OBJCOPY "${CMAKE_C_COMPILER}")
add_custom_command(
TARGET "${G1A_TARGET}" POST_BUILD