mirror of
https://github.com/opencv/opencv.git
synced 2025-06-12 04:12:52 +08:00
cmake: fix support of duplicated file names in static libraries
This commit is contained in:
parent
a5d16f09e6
commit
f1adc32765
@ -172,3 +172,13 @@ elseif(MINGW)
|
||||
set(OpenCV_ARCH x86)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Fix handling of duplicated files in the same static library:
|
||||
# https://public.kitware.com/Bug/view.php?id=14874
|
||||
if(CMAKE_VERSION VERSION_LESS "3.1")
|
||||
foreach(var CMAKE_C_ARCHIVE_APPEND CMAKE_CXX_ARCHIVE_APPEND)
|
||||
if(${var} MATCHES "^<CMAKE_AR> r")
|
||||
string(REPLACE "<CMAKE_AR> r" "<CMAKE_AR> q" ${var} "${${var}}")
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
|
Loading…
Reference in New Issue
Block a user