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

pull/1623/head
Greg Hale 11 years ago
parent 46eeb106e2
commit f23b51de6f
  1. 7
      cmake/OpenCVGenPkgconfig.cmake

@ -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

Loading…
Cancel
Save