Skip to content

Commit

Permalink
allow overriding "cmake"
Browse files Browse the repository at this point in the history
useful for OSXCross' CMake wrapper
  • Loading branch information
stefantalpalaru committed May 12, 2021
1 parent ce966b1 commit 63196b0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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) && \
Expand Down

0 comments on commit 63196b0

Please sign in to comment.