Merge pull request #1623 from ImAlsoGreg:2.4-pkgconfig-dash-l

This commit is contained in:
Roman Donchenko 2013-10-24 14:18:10 +04:00 committed by OpenCV Buildbot
commit 119cdc57e9

View File

@ -57,8 +57,17 @@ 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}")
foreach(extra_component ${OpenCV_EXTRA_COMPONENTS})
if(extra_component MATCHES "^-[lL]" OR extra_component MATCHES "[\\/]")
set(maybe_l_prefix "")
else()
set(maybe_l_prefix "-l")
endif()
set(OpenCV_LIB_COMPONENTS "${OpenCV_LIB_COMPONENTS} ${maybe_l_prefix}${extra_component}")
endforeach()
endif()
#generate the .pc file