Merge pull request #1623 from ImAlsoGreg:2.4-pkgconfig-dash-l
This commit is contained in:
commit
119cdc57e9
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user