Turn ocv_convert_to_lib_name into a function
This commit is contained in:
parent
5678ba1227
commit
122b9f8e17
@ -449,17 +449,15 @@ endmacro()
|
||||
|
||||
|
||||
# convert list of paths to libraries names without lib prefix
|
||||
macro(ocv_convert_to_lib_name var)
|
||||
set(__tmp "")
|
||||
function(ocv_convert_to_lib_name var)
|
||||
set(tmp "")
|
||||
foreach(path ${ARGN})
|
||||
get_filename_component(__tmp_name "${path}" NAME_WE)
|
||||
string(REGEX REPLACE "^lib" "" __tmp_name ${__tmp_name})
|
||||
list(APPEND __tmp "${__tmp_name}")
|
||||
get_filename_component(tmp_name "${path}" NAME_WE)
|
||||
string(REGEX REPLACE "^lib" "" tmp_name "${tmp_name}")
|
||||
list(APPEND tmp "${tmp_name}")
|
||||
endforeach()
|
||||
set(${var} ${__tmp})
|
||||
unset(__tmp)
|
||||
unset(__tmp_name)
|
||||
endmacro()
|
||||
set(${var} ${tmp} PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
|
||||
# add install command
|
||||
|
Loading…
Reference in New Issue
Block a user