From 261837e7202ec584f653f379851e1c6457396b07 Mon Sep 17 00:00:00 2001 From: Ebrahim Byagowi Date: Fri, 28 Oct 2016 21:49:11 +0330 Subject: [PATCH] Fix "nmake install" when ADDITIONAL_LIB_DIR is provided and test it on CI (#356) --- appveyor.yml | 1 + win32/detectenv-msvc.mak | 4 ++-- win32/generate-msvc.mak | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index ddcc9a41a..2a0e7c59f 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -43,6 +43,7 @@ build_script: - 'if "%compiler%"=="msvc" C:\msys64\usr\bin\bash -lc "cd $APPVEYOR_BUILD_FOLDER; PATH=$PATH:/mingw64/bin:/mingw32/bin; ./autogen.sh; make distdir"' - 'if "%compiler%"=="msvc" cd harfbuzz-*\win32' - 'if "%compiler%"=="msvc" nmake /f Makefile.vc CFG=%CFG% UNISCRIBE=1 DIRECTWRITE=1 FREETYPE=1 FREETYPE_DIR=..\..\vcpkg\installed\%VCPKG_ARCH%\include ADDITIONAL_LIB_DIR=..\..\vcpkg\installed\%VCPKG_ARCH%\lib' + - 'if "%compiler%"=="msvc" nmake /f Makefile.vc CFG=%CFG% UNISCRIBE=1 DIRECTWRITE=1 FREETYPE=1 install' - 'if "%compiler%"=="msys2" C:\msys64\usr\bin\bash -lc "pacman --noconfirm -S mingw-w64-$MSYS2_ARCH-{freetype,cairo,icu,gettext,gobject-introspection,gcc,gcc-libs,glib2,graphite2,pkg-config}"' - 'if "%compiler%"=="msys2" C:\msys64\usr\bin\bash -lc "cd $APPVEYOR_BUILD_FOLDER; PATH=$PATH:/mingw64/bin:/mingw32/bin; ./autogen.sh --with-uniscribe --with-freetype --with-glib --with-gobject --with-cairo --with-icu --with-graphite2 --build=$MINGW_CHOST --host=$MINGW_CHOST --prefix=$MINGW_PREFIX; make; make check"' diff --git a/win32/detectenv-msvc.mak b/win32/detectenv-msvc.mak index 41f4bd097..80a5eed7a 100644 --- a/win32/detectenv-msvc.mak +++ b/win32/detectenv-msvc.mak @@ -129,10 +129,10 @@ LDFLAGS_ARCH = /machine:x86 !if "$(VALID_CFGSET)" == "TRUE" CFLAGS = $(CFLAGS_ADD) /W3 /Zi /I.. /I..\src /I. /I$(PREFIX)\include -LDFLAGS_BASE = $(LDFLAGS_ARCH) /libpath:$(PREFIX)\lib /DEBUG !if "$(ADDITIONAL_LIB_DIR)" != "" -LDFLAGS_BASE = $(LDFLAGS_ARCH) /libpath:$(ADDITIONAL_LIB_DIR) +ADDITIONAL_LIB_ARG = /libpath:$(ADDITIONAL_LIB_DIR) !endif +LDFLAGS_BASE = $(LDFLAGS_ARCH) /libpath:$(PREFIX)\lib $(ADDITIONAL_LIB_ARG) /DEBUG !if "$(CFG)" == "debug" LDFLAGS = $(LDFLAGS_BASE) diff --git a/win32/generate-msvc.mak b/win32/generate-msvc.mak index 7c17a9465..57cfb6ecb 100644 --- a/win32/generate-msvc.mak +++ b/win32/generate-msvc.mak @@ -23,4 +23,4 @@ $(HB_GOBJECT_ENUM_GENERATED_SOURCES): ..\src\hb-gobject-enums.h.tmpl ..\src\hb-g # Create the build directories $(CFG)\$(PLAT)\harfbuzz $(CFG)\$(PLAT)\harfbuzz-icu $(CFG)\$(PLAT)\harfbuzz-gobject $(CFG)\$(PLAT)\util: - @-mkdir -p $@ + @-md $@