1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 07:13:02 +04:00

Only append -l to lib entries with no path and no -l or -L of their own

This commit is contained in:
Greg Hale
2013-10-17 14:05:06 -04:00
parent 70df365c87
commit 5bd5993663
+7 -1
View File
@@ -58,7 +58,13 @@ endforeach()
set(OpenCV_LIB_COMPONENTS ${OpenCV_LIB_COMPONENTS_})
if(OpenCV_EXTRA_COMPONENTS)
foreach(extra_component ${OpenCV_EXTRA_COMPONENTS})
set(OpenCV_LIB_COMPONENTS "${OpenCV_LIB_COMPONENTS} -l${extra_component}")
if(extra_component MATCHES "-[lL](.*)" )
set(OpenCV_LIB_COMPONENTS "${OpenCV_LIB_COMPONENTS} ${extra_component}")
elseif(extra_component MATCHES "/")
set(OpenCV_LIB_COMPONENTS "${OpenCV_LIB_COMPONENTS} ${extra_component}")
else()
set(OpenCV_LIB_COMPONENTS "${OpenCV_LIB_COMPONENTS} -l${extra_component}")
endif()
endforeach()
endif()