mirror of
https://git.planet-casio.com/Lephenixnoir/fxsdk.git
synced 2024-12-29 13:03:37 +01:00
cmake: allow single quotes in paths for generate_g3a()
This commit is contained in:
parent
e8c7084942
commit
5feca5d2e1
1 changed files with 7 additions and 2 deletions
|
@ -21,6 +21,8 @@ function(generate_g3a)
|
||||||
if(DEFINED G3A_OUTPUT)
|
if(DEFINED G3A_OUTPUT)
|
||||||
get_filename_component(G3A_OUTPUT "${G3A_OUTPUT}" ABSOLUTE
|
get_filename_component(G3A_OUTPUT "${G3A_OUTPUT}" ABSOLUTE
|
||||||
BASE_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
|
BASE_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
|
||||||
|
# Who doesn't love to deal with escaping
|
||||||
|
string(REPLACE "'" "\\'" G3A_OUTPUT "${G3A_OUTPUT}")
|
||||||
else()
|
else()
|
||||||
set(G3A_OUTPUT "${G3A_TARGET}.g3a")
|
set(G3A_OUTPUT "${G3A_TARGET}.g3a")
|
||||||
endif()
|
endif()
|
||||||
|
@ -47,14 +49,17 @@ function(generate_g3a)
|
||||||
BASE_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
|
BASE_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
|
||||||
get_filename_component(G3A_ICON2 "${G3A_ICON2}" ABSOLUTE
|
get_filename_component(G3A_ICON2 "${G3A_ICON2}" ABSOLUTE
|
||||||
BASE_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
|
BASE_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
|
||||||
list(APPEND MKG3A_ARGS "-i" "uns:${G3A_ICON1}" "-i" "sel:${G3A_ICON2}")
|
# Who doesn't REALLY love to deal with escaping
|
||||||
|
string(REPLACE "'" "\\'" G3A_ICON1B "${G3A_ICON1}")
|
||||||
|
string(REPLACE "'" "\\'" G3A_ICON2B "${G3A_ICON2}")
|
||||||
|
list(APPEND MKG3A_ARGS "-i" "uns:${G3A_ICON1B}" "-i" "sel:${G3A_ICON2B}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
string(REPLACE "gcc" "objcopy" OBJCOPY "${CMAKE_C_COMPILER}")
|
string(REPLACE "gcc" "objcopy" OBJCOPY "${CMAKE_C_COMPILER}")
|
||||||
|
|
||||||
add_custom_command(
|
add_custom_command(
|
||||||
TARGET "${G3A_TARGET}" POST_BUILD
|
TARGET "${G3A_TARGET}" POST_BUILD
|
||||||
COMMAND "${OBJCOPY}" -O binary -R .bss -R .gint_bss "${G3A_TARGET}" "${G3A_TARGET}.bin"
|
COMMAND ${OBJCOPY} -O binary -R .bss -R .gint_bss ${G3A_TARGET} ${G3A_TARGET}.bin
|
||||||
COMMAND mkg3a ${MKG3A_ARGS} "${G3A_TARGET}.bin" "${G3A_OUTPUT}"
|
COMMAND mkg3a ${MKG3A_ARGS} "${G3A_TARGET}.bin" "${G3A_OUTPUT}"
|
||||||
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
|
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue