From: Eicke Herbertz <woll...@posteo.de>

When CMAKE_GENERATOR environment variable is defined, CMake will use the
specified generator by default instead of "Unix Makefiles".
This breaks the build of packages setting PKG_USE_NINJA to 0, like
package/kernel/mt76.

Signed-off-by: Eicke Herbertz <woll...@posteo.de>
---
 include/cmake.mk | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/cmake.mk b/include/cmake.mk
index 95870ffdb0..32e94d384b 100644
--- a/include/cmake.mk
+++ b/include/cmake.mk
@@ -68,6 +68,8 @@ ifeq ($(HOST_USE_NINJA),1)
   define Host/Uninstall/Default
        +$(NINJA) -C $(HOST_CMAKE_BINARY_DIR) uninstall
   endef
+else
+  CMAKE_HOST_OPTIONS += -DCMAKE_GENERATOR="Unix Makefiles"
 endif
 
 ifeq ($(PKG_USE_NINJA),1)
@@ -80,6 +82,8 @@ ifeq ($(PKG_USE_NINJA),1)
   define Build/Install/Default
        +DESTDIR="$(PKG_INSTALL_DIR)" $(NINJA) -C $(CMAKE_BINARY_DIR) install
   endef
+else
+  CMAKE_OPTIONS += -DCMAKE_GENERATOR="Unix Makefiles"
 endif
 
 define Build/Configure/Default
-- 
2.42.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to