mirror of
https://github.com/Fishwaldo/bl_mcu_sdk.git
synced 2025-07-08 13:58:35 +00:00
[chore] fix library check bug
This commit is contained in:
parent
cee97fe003
commit
d92d1e9019
1 changed files with 1 additions and 3 deletions
|
@ -217,12 +217,10 @@ function(check_add_library target_name directory)
|
||||||
if(NOT TARGET ${target_name})
|
if(NOT TARGET ${target_name})
|
||||||
add_subdirectory(${directory} ${CMAKE_SOURCE_DIR}/build/libraries/${target_name})
|
add_subdirectory(${directory} ${CMAKE_SOURCE_DIR}/build/libraries/${target_name})
|
||||||
endif()
|
endif()
|
||||||
elseif()
|
elseif(EXISTS ${target_name})
|
||||||
if(EXISTS ${target_name})
|
|
||||||
get_filename_component(lib_relative_dir ${target_name} DIRECTORY)
|
get_filename_component(lib_relative_dir ${target_name} DIRECTORY)
|
||||||
get_filename_component(library_name ${target_name} NAME_WE)
|
get_filename_component(library_name ${target_name} NAME_WE)
|
||||||
message(STATUS "[register extern library component: ${library_name}], path:${lib_relative_dir}")
|
message(STATUS "[register extern library component: ${library_name}], path:${lib_relative_dir}")
|
||||||
endif()
|
|
||||||
else()
|
else()
|
||||||
message(FATAL_ERROR "both ${target_name} and ${directory} is not exist")
|
message(FATAL_ERROR "both ${target_name} and ${directory} is not exist")
|
||||||
endif()
|
endif()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue