[cmake] Improve OTRExporter asset extraction script, Lower required CMake to 3.16 (#1196)
* supply ZAPD.out path as an argument to extract_assets.py rather than regenerating the script Generating an entirely new script file to change a string is excessive. Instead, extract_assets.py takes in one optional positional argument that contains the path to ZAPD.out, the original purpose for the string replacement. This also removes the need for the file(CHMOD ...) command, which bumps the minimum cmake version all the way up to 3.19. Additionally, there was an extra script being generated in OTRExporter/CMakeLists.txt that used the same CHMOD logic, but did not accurately declare its minimum version to 3.19, this removes that unused logic. * OTRExporter: accept a rom path as an argument to extract_assets.pypull/1211/head
parent
b46c7a0607
commit
b7f9960a60
@ -1,5 +0,0 @@
|
||||
file(READ ${CMAKE_CURRENT_SOURCE_DIR}/extract_assets.py filedata)
|
||||
string(REGEX REPLACE "zapd_exe = .*exec_cmd =" "zapd_exe = \"${program}\"\n exec_cmd =" filedata "${filedata}")
|
||||
file(WRITE "${CMAKE_CURRENT_SOURCE_DIR}/extract_assets_cmake2.py" "${filedata}")
|
||||
file(CHMOD "${CMAKE_CURRENT_SOURCE_DIR}/extract_assets_cmake2.py" PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_WRITE GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
|
||||
|
Loading…
Reference in New Issue