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:
@@ -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