Commit e37ce851902af9a0c54508a693024ceaccf49abd
1 parent
8ca46d1f
Clarify static vs. import library on Windows (fixes #225)
Showing
4 changed files
with
13 additions
and
6 deletions
ChangeLog
| 1 | +2018-08-14 Jay Berkenbilt <ejb@ql.org> | |
| 2 | + | |
| 3 | + * For the mingw builds, change the name of the DLL import library | |
| 4 | + from libqpdf.a to libqpdf.dll.a to avoid confusing it with a | |
| 5 | + static library. This potentially clears the way for supporting a | |
| 6 | + static library in the future, though presently, the qpdf Windows | |
| 7 | + build only builds the DLL and executables. Fixes #225. | |
| 8 | + | |
| 1 | 9 | 2018-08-13 Jay Berkenbilt <ejb@ql.org> |
| 2 | 10 | |
| 3 | 11 | * Add new class QPDFSystemError, derived from std::runtime_error, | ... | ... |
make/installwin.mk
| 1 | 1 | DEST=$(INSTALL_DIR)/$(PACKAGE_TARNAME)-$(PACKAGE_VERSION) |
| 2 | +IMPORT_LIB_NAME := $(call libname,qpdf) | |
| 2 | 3 | installwin: all |
| 3 | 4 | $(RM) -r $(INSTALL_DIR) |
| 4 | 5 | mkdir $(INSTALL_DIR) |
| ... | ... | @@ -8,7 +9,7 @@ installwin: all |
| 8 | 9 | mkdir $(DEST)/include |
| 9 | 10 | mkdir $(DEST)/include/qpdf |
| 10 | 11 | mkdir $(DEST)/doc |
| 11 | - cp libqpdf/$(OUTPUT_DIR)/$(STATIC_LIB_NAME) $(DEST)/lib | |
| 12 | + cp libqpdf/$(OUTPUT_DIR)/$(IMPORT_LIB_NAME) $(DEST)/lib | |
| 12 | 13 | cp libqpdf/$(OUTPUT_DIR)/qpdf*.dll $(DEST)/bin |
| 13 | 14 | perl copy_dlls libqpdf/$(OUTPUT_DIR)/qpdf*.dll $(DEST)/bin $(OBJDUMP) $(WINDOWS_WORDSIZE) |
| 14 | 15 | cp qpdf/$(OUTPUT_DIR)/qpdf.exe $(DEST)/bin | ... | ... |
make/mingw.mk
| ... | ... | @@ -5,7 +5,7 @@ LOBJ=o |
| 5 | 5 | |
| 6 | 6 | # Usage: $(call libname,base) |
| 7 | 7 | define libname |
| 8 | -lib$(1).a | |
| 8 | +lib$(1).dll.a | |
| 9 | 9 | endef |
| 10 | 10 | |
| 11 | 11 | # Usage: $(call binname,base) |
| ... | ... | @@ -62,8 +62,8 @@ endef |
| 62 | 62 | # 1 2 3 4 5 6 7 |
| 63 | 63 | # Usage: $(call makelib,objs,library,ldflags,libs,current,revision,age) |
| 64 | 64 | define makelib |
| 65 | - $(DLLTOOL) -l $(2) -D $$(basename `echo $(2) | sed -e 's,/lib\(.*\).a,/\1,'`$(shell expr $(5) - $(7)).dll) $(1); \ | |
| 66 | - $(CXX) -shared -o `echo $(2) | sed -e 's,/lib\(.*\).a,/\1,'`$(shell expr $(5) - $(7)).dll \ | |
| 65 | + $(DLLTOOL) -l $(2) -D $$(basename `echo $(2) | sed -e 's,/lib\(.*\).dll.a,/\1,'`$(shell expr $(5) - $(7)).dll) $(1); \ | |
| 66 | + $(CXX) -shared -o `echo $(2) | sed -e 's,/lib\(.*\).dll.a,/\1,'`$(shell expr $(5) - $(7)).dll \ | |
| 67 | 67 | $(1) $(3) $(4) |
| 68 | 68 | endef |
| 69 | 69 | |
| ... | ... | @@ -76,7 +76,6 @@ endef |
| 76 | 76 | # Install target |
| 77 | 77 | |
| 78 | 78 | INSTALL_DIR = install-mingw$(WINDOWS_WORDSIZE) |
| 79 | -STATIC_LIB_NAME = libqpdf.a | |
| 80 | 79 | include make/installwin.mk |
| 81 | 80 | install: installwin |
| 82 | 81 | $(STRIP) $(DEST)/bin/*.exe | ... | ... |