From 63196b0628fd6742a9467842f771d3b1ed1fb803 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C8=98tefan=20Talpalaru?= Date: Thu, 13 May 2021 00:21:59 +0200 Subject: [PATCH] allow overriding "cmake" useful for OSXCross' CMake wrapper --- Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 4923e0e..dc523a0 100644 --- a/Makefile +++ b/Makefile @@ -9,6 +9,7 @@ SHELL := bash # the shell used internally by Make NIM_PARAMS := -f --outdir:build --skipParentCfg:on --skipUserCfg:on $(NIMFLAGS) BUILD_MSG := "\\e[92mBuilding:\\e[39m" +CMAKE := cmake # verbosity level V := 0 @@ -140,10 +141,10 @@ $(LIBDIR)/libbacktrace.a: # DESTDIR does not work on Windows for a CMake-generated Makefile $(LIBDIR)/libunwind.a: + echo -e $(BUILD_MSG) "$@"; \ - which cmake &>/dev/null || { echo "CMake not installed. Aborting."; exit 1; }; \ + which $(CMAKE) &>/dev/null || { echo "CMake not installed. Aborting."; exit 1; }; \ cd vendor/libunwind && \ rm -f CMakeCache.txt && \ - cmake -DLIBUNWIND_ENABLE_SHARED=OFF -DLIBUNWIND_ENABLE_STATIC=ON -DLIBUNWIND_INCLUDE_DOCS=OFF \ + $(CMAKE) -DLIBUNWIND_ENABLE_SHARED=OFF -DLIBUNWIND_ENABLE_STATIC=ON -DLIBUNWIND_INCLUDE_DOCS=OFF \ -DLIBUNWIND_LIBDIR_SUFFIX="" -DCMAKE_INSTALL_PREFIX="$(CURDIR)/install/usr" -DCMAKE_CROSSCOMPILING=1 \ $(CMAKE_ARGS) . $(HANDLE_OUTPUT) && \ $(MAKE) VERBOSE=$(V) clean install $(HANDLE_OUTPUT) && \