Skip to content

Commit

Permalink
improve mobile_project_helper.py
Browse files Browse the repository at this point in the history
  • Loading branch information
xianjimli committed Nov 26, 2024
1 parent 2fb1123 commit c34395b
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion scripts/mobile_project_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,10 +280,15 @@ def update_cmake_file(config, filename):
"${AWTK_APP_PATH}/res\n ${AWTK_APP_PATH}/src\n ${AWTK_APP_PATH}/3rd\n"
)
for f in includes:
sincludes += " ${AWTK_APP_PATH}/" + f + "\n"
if os.path.isabs(f):
sincludes += " " + f + "\n"
else:
sincludes += " ${AWTK_APP_PATH}/" + f + "\n"

print("process " + filename)

cflags = to_string(config_get_cflags(config))
linkflags = to_string(config_get_linkflags(config))
defines = to_string(config_get_defines(config))
cppflags = to_string(config_get_cppflags(config))
default_font_name = config_get_font_name(config)
Expand All @@ -296,6 +301,7 @@ def update_cmake_file(config, filename):
file_replace(filename, "EXTRA_DEFINES", defines)
file_replace(filename, "EXTRA_CPPFLAGS", cppflags)
file_replace(filename, "EXTRA_INCLUDES", sincludes)
file_replace(filename, "EXTRA_LINK_FLAGS", linkflags)
file_replace(filename, "AWTK_DEFAULT_FONT_NAME", default_font_name)

def config_get_app_type(config):
Expand Down Expand Up @@ -361,6 +367,12 @@ def config_get_cflags(config):
else:
return ""

def config_get_linkflags(config):
if "linkflags" in config:
return config["linkflags"]
else:
return ""


def config_get_defines(config):
if "defines" in config:
Expand Down

0 comments on commit c34395b

Please sign in to comment.