Skip to content

Commit 0733dbf

Browse files
committed
Fixed some issues from previous commit, RG_TARGET_ is now set correctly
1 parent bb6427e commit 0733dbf

File tree

3 files changed

+7
-18
lines changed

3 files changed

+7
-18
lines changed

base.cmake

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,7 @@ macro(rg_setup_compile_options)
2929
component_compile_options(-DENABLE_NETPLAY)
3030
endif()
3131

32-
# Is there a way to simply import all RG_TARGET_* ?
33-
if($ENV{RG_TARGET_MRGC_G32})
34-
component_compile_options(-DRG_TARGET_MRGC_G32)
35-
endif()
36-
37-
if($ENV{RG_TARGET_ODROID_GO})
38-
component_compile_options(-DRG_TARGET_ODROID_GO)
39-
endif()
40-
32+
set(RG_TARGET "RG_TARGET_$ENV{RG_TARGET}")
33+
component_compile_options(-D${RG_TARGET})
34+
message("Target: ${RG_TARGET}")
4135
endmacro()

components/retro-go/CMakeLists.txt

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,6 @@ if($ENV{ENABLE_NETPLAY})
1313
component_compile_options(-DENABLE_NETPLAY)
1414
endif()
1515

16-
# Is there a way to simply import all RG_TARGET_* ?
17-
if($ENV{RG_TARGET_MRGC_G32})
18-
component_compile_options(-DRG_TARGET_MRGC_G32)
19-
endif()
20-
21-
if($ENV{RG_TARGET_ODROID_GO})
22-
component_compile_options(-DRG_TARGET_ODROID_GO)
23-
endif()
16+
set(RG_TARGET "RG_TARGET_$ENV{RG_TARGET}")
17+
component_compile_options(-D${RG_TARGET})
18+
message("Target: ${RG_TARGET}")

rg_tool.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ def build_app(target, build_type=None, with_netplay=False, build_target=None):
155155
os.putenv("ENABLE_NETPLAY", "1" if with_netplay else "0")
156156
os.putenv("PROJECT_VER", PROJECT_VER)
157157
if build_target:
158-
os.putenv("RG_TARGET_" + re.sub(r'[^A-Z0-9]', '_', build_target.upper()), "1")
158+
os.putenv("RG_TARGET", re.sub(r'[^A-Z0-9]', '_', build_target.upper()))
159159
subprocess.run("idf.py app", shell=True, check=True)
160160

161161
print("Patching esp_image_header_t to skip sha256 on boot...")

0 commit comments

Comments
 (0)