summaryrefslogtreecommitdiff
path: root/win32/rsvg-rust.mak
diff options
context:
space:
mode:
authorChun-wei Fan <fanchunwei@src.gnome.org>2019-06-26 19:05:07 +0800
committerChun-wei Fan <fanchunwei@src.gnome.org>2019-07-01 23:52:20 +0800
commit433088f514152f01dceb7e1efab19607a57f78d4 (patch)
treebd8159e4b778b4bc6e3c440d3ecf16e11dba6a98 /win32/rsvg-rust.mak
parent50c3a6cdcf617708301a41ee0081bbcbe20f9fe2 (diff)
downloadlibrsvg-433088f514152f01dceb7e1efab19607a57f78d4.tar.gz
Visual Studio builds: Add a set of NMake Makefiles
This adds a set of NMake Makefiles, which will replace the Visual Studio projects, so that we can have a more flexible build setup, and would be usable for Visual Studio 2013 and later. This also has the advantage to build optional items (such as rsvg-view-3, which requires GTK, Introspection, and PangoFT2 support for the test programs) on demand in one go, and adds a target 'tests' to build and run the test programs in tests/ for librsvg. This NMake Makefile set should cover all the build features that are handled by the current Visual Studio projects. This will also enable the removal of the autotools 'dist hook' directives that are being used to generate the complete Visual Studio projects, as we are now able to share source listings with the autotools build files directly, which will be done in the upcoming commit(s).
Diffstat (limited to 'win32/rsvg-rust.mak')
-rw-r--r--win32/rsvg-rust.mak13
1 files changed, 10 insertions, 3 deletions
diff --git a/win32/rsvg-rust.mak b/win32/rsvg-rust.mak
index bfd065c4..22ff8c74 100644
--- a/win32/rsvg-rust.mak
+++ b/win32/rsvg-rust.mak
@@ -1,4 +1,9 @@
+!ifndef VCVER
!include detectenv-msvc.mak
+!ifndef LIBDIR
+LIBDIR=$(PREFIX)\lib
+!endif
+!endif
!if "$(CARGO)" == ""
CARGO = cargo
@@ -33,20 +38,22 @@ CARGO_CMD = $(CARGO) build $(CARGO_TARGET)
!endif
vs$(VSVER)\$(CFG)\$(PLAT)\obj\rsvg_internals\$(RUST_TARGET)-pc-windows-msvc\$(CFG)\rsvg_internals.lib:
+ @set PATH=%PATH%;%HOMEPATH%\.cargo\bin
@set CARGO_TARGET_DIR=..\win32\vs$(VSVER)\$(CFG)\$(PLAT)\obj\rsvg_internals
- @set GTK_LIB_DIR=..\..\vs$(VSVER)\$(PLAT)\lib;$(LIB)
+ @set GTK_LIB_DIR=$(LIBDIR);$(LIB)
$(RUSTUP_CMD)
@cd ..\rsvg_internals
$(CARGO_CMD) --verbose
- @cd ..\win32\vs$(VSVER)
+ @cd ..\win32
@set GTK_LIB_DIR=
@set CARGO_TARGET_DIR=
cargo-clean:
+ @set PATH=%PATH%;%HOMEPATH%\.cargo\bin
@set CARGO_TARGET_DIR=..\win32\vs$(VSVER)\$(CFG)\$(PLAT)\obj\rsvg_internals
@cd ..\rsvg_internals
@$(CARGO) clean
- @cd ..\win32\vs$(VSVER)
+ @cd ..\win32
@set CARGO_TARGET_DIR=
!else