From 4a4649e04a2ba3b59a2a9153a4e2c997e912d430 Mon Sep 17 00:00:00 2001 From: Beginner-Go <70857188+Beginner-Go@users.noreply.github.com> Date: Sat, 26 Feb 2022 17:14:39 +0000 Subject: [PATCH] tools/cmake: sync upstream --- tools/cmake/Makefile | 15 ++++++++++++++- tools/cmake/patches/100-no-testing.patch | 2 +- .../patches/120-curl-fix-libressl-linking.patch | 2 +- .../130-bootstrap_parallel_make_flag.patch | 2 +- 4 files changed, 17 insertions(+), 4 deletions(-) diff --git a/tools/cmake/Makefile b/tools/cmake/Makefile index 4b798479e..8f0631eb7 100644 --- a/tools/cmake/Makefile +++ b/tools/cmake/Makefile @@ -30,7 +30,20 @@ HOST_CONFIGURE_VARS += \ HOST_CONFIGURE_ARGS := \ $(if $(MAKE_JOBSERVER),--parallel="$(MAKE_JOBSERVER)") \ - --prefix=$(STAGING_DIR_HOST) + --prefix="$(STAGING_DIR_HOST)" \ + --generator=Ninja + +define Host/Compile/Default + +$(NINJA) -C $(HOST_BUILD_DIR) $(1) +endef + +define Host/Install/Default + +$(NINJA) -C $(HOST_BUILD_DIR) install +endef + +define Host/Uninstall/Default + +$(NINJA) -C $(HOST_BUILD_DIR) uninstall +endef ifneq ($(findstring c,$(OPENWRT_VERBOSE)),) HOST_MAKE_FLAGS += VERBOSE=1 diff --git a/tools/cmake/patches/100-no-testing.patch b/tools/cmake/patches/100-no-testing.patch index 3ea324231..44452ce39 100644 --- a/tools/cmake/patches/100-no-testing.patch +++ b/tools/cmake/patches/100-no-testing.patch @@ -30,4 +30,4 @@ + VTK_BUILD_TESTING:STRING=OFF VTK_WRAP_PYTHON:BOOL=ON ExternalData_OBJECT_STORES:FILEPATH=@base_dir@/ExternalData - ") \ No newline at end of file + ") diff --git a/tools/cmake/patches/120-curl-fix-libressl-linking.patch b/tools/cmake/patches/120-curl-fix-libressl-linking.patch index e46f29156..fd05d106c 100644 --- a/tools/cmake/patches/120-curl-fix-libressl-linking.patch +++ b/tools/cmake/patches/120-curl-fix-libressl-linking.patch @@ -34,4 +34,4 @@ Signed-off-by: Jo-Philipp Wich + endif() list(APPEND CURL_LIBS ${OPENSSL_LIBRARIES}) include_directories(${OPENSSL_INCLUDE_DIR}) - \ No newline at end of file + diff --git a/tools/cmake/patches/130-bootstrap_parallel_make_flag.patch b/tools/cmake/patches/130-bootstrap_parallel_make_flag.patch index 6d80f744c..dd66989c9 100644 --- a/tools/cmake/patches/130-bootstrap_parallel_make_flag.patch +++ b/tools/cmake/patches/130-bootstrap_parallel_make_flag.patch @@ -11,4 +11,4 @@ + cmake_make_flags="${cmake_make_flags} ${cmake_parallel_make}" fi for a in ${cmake_make_processors}; do - if test -z "${cmake_make_processor}" && cmake_try_make "${a}" "${cmake_make_flags}" >> ../cmake_bootstrap.log 2>&1; then \ No newline at end of file + if test -z "${cmake_make_processor}" && cmake_try_make "${a}" "${cmake_make_flags}" >> ../cmake_bootstrap.log 2>&1; then