mirror of
https://github.com/sipeed/MaixCDK.git
synced 2026-09-10 21:59:54 -05:00
add ADD_LINK_DEFINITIONS support for cmakelist file
This commit is contained in:
@@ -174,10 +174,10 @@ namespace maix::app
|
||||
continue;
|
||||
}
|
||||
ret = ini.GetStringValue(app_id, "icon", &app_icon);
|
||||
if (ret != RET_OK)
|
||||
if (ret != RET_OK || app_icon.empty())
|
||||
{
|
||||
printf("get app %s icon failed: %d\n", app_id.c_str(), ret);
|
||||
continue;
|
||||
printf("get app %s icon failed: %d, use default icon\n", app_id.c_str(), ret);
|
||||
app_icon = "/maixapp/share/icon/icon.json";
|
||||
}
|
||||
if (fs::isabs(app_icon) == false)
|
||||
{
|
||||
|
||||
@@ -137,11 +137,23 @@ function(register_component)
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
# Add definitions public
|
||||
foreach(difinition ${ADD_LINK_DEFINITIONS})
|
||||
if(${include_type} STREQUAL INTERFACE)
|
||||
target_link_options(${component_name} INTERFACE ${difinition})
|
||||
else()
|
||||
target_link_options(${component_name} PUBLIC ${difinition})
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
# Add definitions private
|
||||
foreach(difinition ${ADD_DEFINITIONS_PRIVATE})
|
||||
target_compile_options(${component_name} PRIVATE ${difinition})
|
||||
target_link_options(${component_name} PRIVATE ${difinition})
|
||||
endforeach()
|
||||
foreach(difinition ${ADD_LINK_DEFINITIONS_PRIVATE})
|
||||
target_link_options(${component_name} PRIVATE ${difinition})
|
||||
endforeach()
|
||||
|
||||
# Add lib search path
|
||||
if(ADD_LINK_SEARCH_PATH)
|
||||
|
||||
Reference in New Issue
Block a user