package/openjpeg: fix build with threads disabled
authorBernd Kuhls <bernd.kuhls@t-online.de>
Sat, 11 Nov 2017 16:41:53 +0000 (17:41 +0100)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sat, 11 Nov 2017 22:24:53 +0000 (23:24 +0100)
Fixes
http://autobuild.buildroot.net/results/f16/f16a558c30199a92e93a31e0ba391b99a9bd689f/

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/openjpeg/openjpeg.mk

index df85168b801769dd52312b0f183469af8cf95c21..9a8fdab7a4882ab8901aba5a57eff1778ebbfb36 100644 (file)
@@ -15,4 +15,10 @@ OPENJPEG_DEPENDENCIES += $(if $(BR2_PACKAGE_LIBPNG),libpng)
 OPENJPEG_DEPENDENCIES += $(if $(BR2_PACKAGE_TIFF),tiff)
 OPENJPEG_DEPENDENCIES += $(if $(BR2_PACKAGE_LCMS2),lcms2)
 
+ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y)
+OPENJPEG_CONF_OPTS += -DOPJ_USE_THREAD=ON
+else
+OPENJPEG_CONF_OPTS += -DOPJ_USE_THREAD=OFF
+endif
+
 $(eval $(cmake-package))