浏览代码

package/libiio: fix compile without thread support

- fix compile without thread support (add configure option
  '-DNO_THREADS=ON' as requested)

Fixes:

  - http://autobuild.buildroot.net/results/2cca5952e7d677cd0d5fa97aa1a7bf3e722df3a2

  CMake Error at CMakeLists.txt:409 (message):
    Unable to find pthread dependency.

    If you want to disable multi-threading support, set NO_THREADS=ON.

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Peter Seiderer 3 年之前
父节点
当前提交
e851eb6c7a
共有 1 个文件被更改,包括 6 次插入0 次删除
  1. 6 0
      package/libiio/libiio.mk

+ 6 - 0
package/libiio/libiio.mk

@@ -17,6 +17,12 @@ LIBIIO_CONF_OPTS = -DENABLE_IPV6=ON \
 	-DWITH_TESTS=$(if $(BR2_PACKAGE_LIBIIO_TESTS),ON,OFF) \
 	-DWITH_DOC=OFF
 
+ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y)
+LIBIIO_CONF_OPTS += -DNO_THREADS=OFF
+else
+LIBIIO_CONF_OPTS += -DNO_THREADS=ON
+endif
+
 ifeq ($(BR2_PACKAGE_LIBIIO_XML_BACKEND),y)
 LIBIIO_DEPENDENCIES += libxml2
 LIBIIO_CONF_OPTS += -DWITH_XML_BACKEND=ON