From 8832a9dbd5ffac0eac29d90d015973bd8a55d09a Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Fri, 2 Dec 2022 22:48:40 +0000 Subject: [PATCH] cmake: ocv_check_modules: ignore -latomic and -lstdc++ --- cmake/OpenCVUtils.cmake | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cmake/OpenCVUtils.cmake b/cmake/OpenCVUtils.cmake index 938c4e1f82..cf628d9951 100644 --- a/cmake/OpenCVUtils.cmake +++ b/cmake/OpenCVUtils.cmake @@ -866,7 +866,10 @@ macro(ocv_check_modules define) foreach(flag ${${define}_LDFLAGS}) if(flag MATCHES "^-L(.*)") list(APPEND _libs_paths ${CMAKE_MATCH_1}) - elseif(IS_ABSOLUTE "${flag}") + elseif(IS_ABSOLUTE "${flag}" + OR flag STREQUAL "-lstdc++" + OR flag STREQUAL "-latomic" + ) list(APPEND _libs "${flag}") elseif(flag MATCHES "^-l(.*)") set(_lib "${CMAKE_MATCH_1}")