[emscripten] Do not link to system libraries
authorSéverin Lemaignan <severin.lemaignan@epfl.ch>
Sat, 28 Dec 2013 10:05:00 +0000 (11:05 +0100)
committerSéverin Lemaignan <severin.lemaignan@epfl.ch>
Mon, 30 Dec 2013 13:04:36 +0000 (14:04 +0100)
This is not meaningful when compiling to javascript, and causes warning
at linking stage.

CMakeLists.txt

index 2fb1cf7..2bb1cfa 100644 (file)
@@ -384,6 +384,8 @@ if(UNIX)
       set(OPENCV_LINKER_LIBS ${OPENCV_LINKER_LIBS} dl m log)
     elseif(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD|NetBSD|DragonFly")
       set(OPENCV_LINKER_LIBS ${OPENCV_LINKER_LIBS} m pthread)
+    elseif(EMSCRIPTEN)
+      # no need to link to system libs with emscripten
     else()
       set(OPENCV_LINKER_LIBS ${OPENCV_LINKER_LIBS} dl m pthread rt)
     endif()