1 From 22e03ef8a9e3adcbc6b2f16c3cc98e4e14443eed Mon Sep 17 00:00:00 2001
2 From: Bernd Kuhls <bernd.kuhls@t-online.de>
3 Date: Sat, 24 Sep 2016 17:51:22 +0200
4 Subject: [PATCH 1/1] CMakeLists.txt: Do not add libdl to LINKER_LIBS for
7 Without this patch -ldl is present in opencv.pc which breaks OpenCV
8 detection by ffmpeg, detected by buildroot autobuilders:
10 http://autobuild.buildroot.net/results/765/7657e01481995a4f0d725467e935a83928a59a04//ffmpeg-3.1.3/config.log
12 /home/peko/autobuild/instance-1/output/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/4.9.4/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld: cannot find -ldl
14 Patch sent upstream: https://github.com/opencv/opencv/pull/7337
16 Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
18 CMakeLists.txt | 5 ++++-
19 1 file changed, 4 insertions(+), 1 deletion(-)
21 diff --git a/CMakeLists.txt b/CMakeLists.txt
22 index 007b80d..99b047d 100644
25 @@ -457,7 +457,10 @@ if(UNIX)
26 elseif(${CMAKE_SYSTEM_NAME} MATCHES "QNX")
27 set(OPENCV_LINKER_LIBS ${OPENCV_LINKER_LIBS} m)
29 - set(OPENCV_LINKER_LIBS ${OPENCV_LINKER_LIBS} dl m pthread rt)
30 + if(BUILD_SHARED_LIBS)
31 + set(OPENCV_LINKER_LIBS ${OPENCV_LINKER_LIBS} dl)
33 + set(OPENCV_LINKER_LIBS ${OPENCV_LINKER_LIBS} m pthread rt)
36 set(HAVE_LIBPTHREAD YES)