File tree Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -84,21 +84,22 @@ macro(ocv_check_environment_variables)
8484 endforeach ()
8585endmacro ()
8686
87- macro (ocv_path_join result_var P1 P2)
88- string (REGEX REPLACE "^[/]+" "" P2 "${P2} " )
89- if ("${P1} " STREQUAL "" )
90- if ("${P2} " STREQUAL "" )
91- set (${result_var} "." )
92- else ()
93- set (${result_var} "${P2} " )
94- endif ()
87+ macro (ocv_path_join result_var P1 P2_)
88+ string (REGEX REPLACE "^[/]+" "" P2 "${P2_} " )
89+ if ("${P1} " STREQUAL "" OR "${P1} " STREQUAL "." )
90+ set (${result_var} "${P2} " )
9591 elseif ("${P1} " STREQUAL "/" )
9692 set (${result_var} "/${P2} " )
9793 elseif ("${P2} " STREQUAL "" )
9894 set (${result_var} "${P1} " )
9995 else ()
10096 set (${result_var} "${P1} /${P2} " )
10197 endif ()
98+ string (REGEX REPLACE "([/\\ ]?)[\\ .][/\\ ]" "\\ 1" ${result_var} "${${result_var} }" )
99+ if ("${${result_var} }" STREQUAL "" )
100+ set (${result_var} "." )
101+ endif ()
102+ #message(STATUS "'${P1}' '${P2_}' => '${${result_var}}'")
102103endmacro ()
103104
104105# rename modules target to world if needed
You can’t perform that action at this time.
0 commit comments