File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -74,8 +74,8 @@ if(OpenCV_EXTRA_COMPONENTS)
74
74
list (APPEND OpenCV_LIB_COMPONENTS_ "${extra_component} " )
75
75
elseif (extra_component MATCHES "[\\ /]" )
76
76
get_filename_component (libdir "${extra_component} " PATH )
77
- get_filename_component (libname "${extra_component} " NAME_WE )
78
- string ( REGEX REPLACE "^lib" "" libname "${libname} " )
77
+ get_filename_component (libname "${extra_component} " NAME )
78
+ ocv_get_libname ( libname "${libname} " )
79
79
list (APPEND OpenCV_LIB_COMPONENTS_ "-L${libdir} " "-l${libname} " )
80
80
else ()
81
81
list (APPEND OpenCV_LIB_COMPONENTS_ "-l${extra_component} " )
Original file line number Diff line number Diff line change @@ -749,6 +749,12 @@ function(ocv_source_group group)
749
749
source_group (${group} FILES ${srcs} )
750
750
endfunction ()
751
751
752
+ macro (ocv_get_libname var_name )
753
+ get_filename_component (__libname "${ARGN} " NAME )
754
+ string (REGEX REPLACE "^lib(.+).(a|so)(.[.0-9]+)?$" "\\ 1" __libname "${__libname} " )
755
+ set (${var_name} "${__libname} " )
756
+ endmacro ()
757
+
752
758
# build the list of simple dependencies, that links via "-l"
753
759
# _all_libs - name of variable with input list
754
760
# _simple - name of variable with output list of simple libs
You can’t perform that action at this time.
0 commit comments