Commit 61ccd170 authored by Greg Hale's avatar Greg Hale

shortened code to not repeat myself

parent 5bd59936
...@@ -58,13 +58,15 @@ endforeach() ...@@ -58,13 +58,15 @@ endforeach()
set(OpenCV_LIB_COMPONENTS ${OpenCV_LIB_COMPONENTS_}) set(OpenCV_LIB_COMPONENTS ${OpenCV_LIB_COMPONENTS_})
if(OpenCV_EXTRA_COMPONENTS) if(OpenCV_EXTRA_COMPONENTS)
foreach(extra_component ${OpenCV_EXTRA_COMPONENTS}) foreach(extra_component ${OpenCV_EXTRA_COMPONENTS})
if(extra_component MATCHES "-[lL](.*)" )
set(OpenCV_LIB_COMPONENTS "${OpenCV_LIB_COMPONENTS} ${extra_component}") if(extra_component MATCHES "-[lL](.*)" OR extra_component MATCHES "/")
elseif(extra_component MATCHES "/") set(maybe_l_prefix "")
set(OpenCV_LIB_COMPONENTS "${OpenCV_LIB_COMPONENTS} ${extra_component}")
else() else()
set(OpenCV_LIB_COMPONENTS "${OpenCV_LIB_COMPONENTS} -l${extra_component}") set(maybe_l_prefix "-l")
endif() endif()
set(OpenCV_LIB_COMPONENTS "${OpenCV_LIB_COMPONENTS} ${maybe_l_prefix}${extra_component}")
endforeach() endforeach()
endif() endif()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment