Added -l prefix to EXTRA_COMPONENTS when generating pkg-config file

This commit is contained in:
Greg Hale 2013-10-14 13:36:07 -04:00
parent 46eeb106e2
commit f23b51de6f

View File

@ -57,8 +57,11 @@ endforeach()
# add extra dependencies required for OpenCV
set(OpenCV_LIB_COMPONENTS ${OpenCV_LIB_COMPONENTS_})
if(OpenCV_EXTRA_COMPONENTS)
string(REPLACE ";" " " OpenCV_EXTRA_COMPONENTS "${OpenCV_EXTRA_COMPONENTS}")
set(OpenCV_LIB_COMPONENTS "${OpenCV_LIB_COMPONENTS} ${OpenCV_EXTRA_COMPONENTS}")
set(OpenCV_DASH_L_EXTRA_COMPONENTS "")
foreach(ExtraComponent ${OpenCV_EXTRA_COMPONENTS})
set(OpenCV_DASH_L_EXTRA_COMPONENTS "${OpenCV_DASH_L_EXTRA_COMPONENTS} -l${ExtraComponent}")
endforeach()
set(OpenCV_LIB_COMPONENTS "${OpenCV_LIB_COMPONENTS} ${OpenCV_DASH_L_EXTRA_COMPONENTS}")
endif()
#generate the .pc file