-
Notifications
You must be signed in to change notification settings - Fork 133
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9fd0242
commit 79ca72b
Showing
5 changed files
with
477 additions
and
249 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,128 @@ | ||
Description: libvpx doesn't generate pkg-config files on Windows, but we need | ||
that for ffmpeg to find the library, so we patch that in. It also tries to | ||
generation what I think are Visual Studio files, but they try to do so by | ||
running shell scripts directly, which of course just triggers the brilliant | ||
WSL mechanism telling you that it's not installed, so we patch that out in turn. | ||
It also uses pkg-config's Libs.private mechanism, which ffmpeg doesn't support, | ||
so we also remove that and just make it use the normal Libs entry. | ||
|
||
--- a/libs.mk | ||
+++ b/libs.mk | ||
@@ -225,74 +225,25 @@ | ||
ifeq ($(CONFIG_EXTERNAL_BUILD),yes) | ||
ifeq ($(CONFIG_MSVS),yes) | ||
|
||
-vpx.def: $(call enabled,CODEC_EXPORTS) | ||
- @echo " [CREATE] $@" | ||
- $(qexec)$(SRC_PATH_BARE)/build/make/gen_msvs_def.sh\ | ||
- --name=vpx\ | ||
- --out=$@ $^ | ||
-CLEAN-OBJS += vpx.def | ||
- | ||
-vpx.$(VCPROJ_SFX): VCPROJ_SRCS=$(filter-out $(addprefix %, $(ASM_INCLUDES)), $^) | ||
- | ||
-vpx.$(VCPROJ_SFX): $(CODEC_SRCS) vpx.def | ||
- @echo " [CREATE] $@" | ||
- $(qexec)$(GEN_VCPROJ) \ | ||
- $(if $(CONFIG_SHARED),--dll,--lib) \ | ||
- --target=$(TOOLCHAIN) \ | ||
- $(if $(CONFIG_STATIC_MSVCRT),--static-crt) \ | ||
- --name=vpx \ | ||
- --proj-guid=DCE19DAF-69AC-46DB-B14A-39F0FAA5DB74 \ | ||
- --module-def=vpx.def \ | ||
- --ver=$(CONFIG_VS_VERSION) \ | ||
- --src-path-bare="$(SRC_PATH_BARE)" \ | ||
- --out=$@ $(CFLAGS) \ | ||
- --as=$(AS) \ | ||
- $(filter $(SRC_PATH_BARE)/vp8/%.c, $(VCPROJ_SRCS)) \ | ||
- $(filter $(SRC_PATH_BARE)/vp8/%.h, $(VCPROJ_SRCS)) \ | ||
- $(filter $(SRC_PATH_BARE)/vp9/%.c, $(VCPROJ_SRCS)) \ | ||
- $(filter $(SRC_PATH_BARE)/vp9/%.h, $(VCPROJ_SRCS)) \ | ||
- $(filter $(SRC_PATH_BARE)/vpx/%, $(VCPROJ_SRCS)) \ | ||
- $(filter $(SRC_PATH_BARE)/vpx_dsp/%, $(VCPROJ_SRCS)) \ | ||
- $(filter-out $(addprefix $(SRC_PATH_BARE)/, \ | ||
- vp8/%.c vp8/%.h vp9/%.c vp9/%.h vpx/% vpx_dsp/%), \ | ||
- $(VCPROJ_SRCS)) \ | ||
- --src-path-bare="$(SRC_PATH_BARE)" \ | ||
- | ||
-PROJECTS-yes += vpx.$(VCPROJ_SFX) | ||
- | ||
-vpx.$(VCPROJ_SFX): vpx_config.asm | ||
-vpx.$(VCPROJ_SFX): $(RTCD) | ||
- | ||
-vpxrc.$(VCPROJ_SFX): \ | ||
- VCPROJ_SRCS=$(filter-out $(addprefix %, $(ASM_INCLUDES)), $^) | ||
- | ||
-vpxrc.$(VCPROJ_SFX): $(RC_RTC_SRCS) | ||
+LIBS-yes += vpx.pc | ||
+vpx.pc: config.mk libs.mk | ||
@echo " [CREATE] $@" | ||
- $(qexec)$(GEN_VCPROJ) \ | ||
- $(if $(CONFIG_SHARED),--dll,--lib) \ | ||
- --target=$(TOOLCHAIN) \ | ||
- $(if $(CONFIG_STATIC_MSVCRT),--static-crt) \ | ||
- --name=vpxrc \ | ||
- --proj-guid=C26FF952-9494-4838-9A3F-7F3D4F613385 \ | ||
- --ver=$(CONFIG_VS_VERSION) \ | ||
- --src-path-bare="$(SRC_PATH_BARE)" \ | ||
- --out=$@ $(CFLAGS) \ | ||
- --as=$(AS) \ | ||
- $(filter $(SRC_PATH_BARE)/vp9/%.c, $(VCPROJ_SRCS)) \ | ||
- $(filter $(SRC_PATH_BARE)/vp9/%.cc, $(VCPROJ_SRCS)) \ | ||
- $(filter $(SRC_PATH_BARE)/vp9/%.h, $(VCPROJ_SRCS)) \ | ||
- $(filter $(SRC_PATH_BARE)/vpx/%, $(VCPROJ_SRCS)) \ | ||
- $(filter $(SRC_PATH_BARE)/vpx_dsp/%, $(VCPROJ_SRCS)) \ | ||
- $(filter-out $(addprefix $(SRC_PATH_BARE)/, \ | ||
- vp8/%.c vp8/%.h vp9/%.c vp9/%.cc vp9/%.h vpx/% \ | ||
- vpx_dsp/%), \ | ||
- $(VCPROJ_SRCS)) \ | ||
- --src-path-bare="$(SRC_PATH_BARE)" \ | ||
- | ||
-PROJECTS-yes += vpxrc.$(VCPROJ_SFX) | ||
- | ||
-vpxrc.$(VCPROJ_SFX): vpx_config.asm | ||
-vpxrc.$(VCPROJ_SFX): $(RTCD) | ||
+ $(qexec)echo '# pkg-config file from libvpx $(VERSION_STRING)' > $@ | ||
+ $(qexec)echo 'prefix=$(PREFIX)' >> $@ | ||
+ $(qexec)echo 'exec_prefix=$${prefix}' >> $@ | ||
+ $(qexec)echo 'libdir=$${prefix}/$(LIBSUBDIR)' >> $@ | ||
+ $(qexec)echo 'includedir=$${prefix}/include' >> $@ | ||
+ $(qexec)echo '' >> $@ | ||
+ $(qexec)echo 'Name: vpx' >> $@ | ||
+ $(qexec)echo 'Description: WebM Project VPx codec implementation' >> $@ | ||
+ $(qexec)echo 'Version: $(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_PATCH)' >> $@ | ||
+ $(qexec)echo 'Requires:' >> $@ | ||
+ $(qexec)echo 'Conflicts:' >> $@ | ||
+ $(qexec)echo 'Libs: -L$${libdir} -lvpx' >> $@ | ||
+ $(qexec)echo 'Cflags: -I$${includedir}' >> $@ | ||
+INSTALL-LIBS-yes += $(LIBSUBDIR)/pkgconfig/vpx.pc | ||
+INSTALL_MAPS += $(LIBSUBDIR)/pkgconfig/%.pc %.pc | ||
+CLEAN-OBJS += vpx.pc | ||
|
||
endif # ifeq ($(CONFIG_MSVS),yes) | ||
else # ifeq ($(CONFIG_EXTERNAL_BUILD),yes) | ||
@@ -401,11 +352,10 @@ | ||
$(qexec)echo 'Version: $(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_PATCH)' >> $@ | ||
$(qexec)echo 'Requires:' >> $@ | ||
$(qexec)echo 'Conflicts:' >> $@ | ||
- $(qexec)echo 'Libs: -L$${libdir} -lvpx -lm' >> $@ | ||
ifeq ($(HAVE_PTHREAD_H),yes) | ||
- $(qexec)echo 'Libs.private: -lm -lpthread' >> $@ | ||
+ $(qexec)echo 'Libs: -L$${libdir} -lvpx -lm -lpthread' >> $@ | ||
else | ||
- $(qexec)echo 'Libs.private: -lm' >> $@ | ||
+ $(qexec)echo 'Libs: -L$${libdir} -lvpx -lm' >> $@ | ||
endif | ||
$(qexec)echo 'Cflags: -I$${includedir}' >> $@ | ||
INSTALL-LIBS-yes += $(LIBSUBDIR)/pkgconfig/vpx.pc | ||
--- a/solution.mk | ||
+++ b/solution.mk | ||
@@ -15,7 +15,7 @@ | ||
|
||
vpx.sln: $(wildcard *.$(VCPROJ_SFX)) | ||
@echo " [CREATE] $@" | ||
- $(SRC_PATH_BARE)/build/make/gen_msvs_sln.sh \ | ||
+ bash $(SRC_PATH_BARE)/build/make/gen_msvs_sln.sh \ | ||
$(if $(filter vpx.$(VCPROJ_SFX),$^),$(VPX_RDEPS)) \ | ||
--dep=test_libvpx:gtest \ | ||
--ver=$(CONFIG_VS_VERSION)\ |
Oops, something went wrong.