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
|
# convert list of paths to libraries names without lib prefix
|
||||||
macro(ocv_convert_to_lib_name var)
|
function(ocv_convert_to_lib_name var)
|
||||||
set(__tmp "")
|
set(tmp "")
|
||||||
foreach(path ${ARGN})
|
foreach(path ${ARGN})
|
||||||
get_filename_component(__tmp_name "${path}" NAME_WE)
|
get_filename_component(tmp_name "${path}" NAME_WE)
|
||||||
string(REGEX REPLACE "^lib" "" __tmp_name ${__tmp_name})
|
string(REGEX REPLACE "^lib" "" tmp_name "${tmp_name}")
|
||||||
list(APPEND __tmp "${__tmp_name}")
|
list(APPEND tmp "${tmp_name}")
|
||||||
endforeach()
|
endforeach()
|
||||||
set(${var} ${__tmp})
|
set(${var} ${tmp} PARENT_SCOPE)
|
||||||
unset(__tmp)
|
endfunction()
|
||||||
unset(__tmp_name)
|
|
||||||
endmacro()
|
|
||||||
|
|
||||||
|
|
||||||
# add install command
|
# add install command
|
||||||
|
Loading…
x
Reference in New Issue
Block a user