Commit 0b4637e0 authored by Martin Storsjo's avatar Martin Storsjo

msvs: Support producing both vcproj and vcxproj depending on configure variables

Change-Id: Ifa27c7064118c24401ea4e55a64e129c4f503cd5
parent bd91bebe
...@@ -231,19 +231,19 @@ endif ...@@ -231,19 +231,19 @@ endif
# even though there is no real dependency there (the dependency is on # even though there is no real dependency there (the dependency is on
# the makefiles). We may want to revisit this. # the makefiles). We may want to revisit this.
define vcproj_template define vcproj_template
$(1): $($(1:.vcproj=).SRCS) $(1): $($(1:.$(VCPROJ_SFX)=).SRCS)
@echo " [vcproj] $$@" @echo " [vcproj] $$@"
$$(SRC_PATH_BARE)/build/make/gen_msvs_proj.sh\ $$(GEN_VCPROJ)\
--exe\ --exe\
--target=$$(TOOLCHAIN)\ --target=$$(TOOLCHAIN)\
--name=$$(@:.vcproj=)\ --name=$$(@:.$(VCPROJ_SFX)=)\
--ver=$$(CONFIG_VS_VERSION)\ --ver=$$(CONFIG_VS_VERSION)\
--proj-guid=$$($$(@:.vcproj=).GUID)\ --proj-guid=$$($$(@:.$(VCPROJ_SFX)=).GUID)\
$$(if $$(CONFIG_STATIC_MSVCRT),--static-crt) \ $$(if $$(CONFIG_STATIC_MSVCRT),--static-crt) \
--out=$$@ $$(INTERNAL_CFLAGS) $$(CFLAGS) \ --out=$$@ $$(INTERNAL_CFLAGS) $$(CFLAGS) \
$$(INTERNAL_LDFLAGS) $$(LDFLAGS) -l$$(CODEC_LIB) -lwinmm $$^ $$(INTERNAL_LDFLAGS) $$(LDFLAGS) -l$$(CODEC_LIB) -lwinmm $$^
endef endef
PROJECTS-$(CONFIG_MSVS) += $(ALL_EXAMPLES:.c=.vcproj) PROJECTS-$(CONFIG_MSVS) += $(ALL_EXAMPLES:.c=.$(VCPROJ_SFX))
INSTALL-BINS-$(CONFIG_MSVS) += $(foreach p,$(VS_PLATFORMS),\ INSTALL-BINS-$(CONFIG_MSVS) += $(foreach p,$(VS_PLATFORMS),\
$(addprefix bin/$(p)/,$(ALL_EXAMPLES:.c=.exe))) $(addprefix bin/$(p)/,$(ALL_EXAMPLES:.c=.exe)))
$(foreach proj,$(call enabled,PROJECTS),\ $(foreach proj,$(call enabled,PROJECTS),\
......
...@@ -207,10 +207,10 @@ libvpx_srcs.txt: ...@@ -207,10 +207,10 @@ libvpx_srcs.txt:
ifeq ($(CONFIG_EXTERNAL_BUILD),yes) ifeq ($(CONFIG_EXTERNAL_BUILD),yes)
ifeq ($(CONFIG_MSVS),yes) ifeq ($(CONFIG_MSVS),yes)
obj_int_extract.vcproj: $(SRC_PATH_BARE)/build/make/obj_int_extract.c obj_int_extract.$(VCPROJ_SFX): $(SRC_PATH_BARE)/build/make/obj_int_extract.c
@cp $(SRC_PATH_BARE)/build/x86-msvs/obj_int_extract.bat . @cp $(SRC_PATH_BARE)/build/x86-msvs/obj_int_extract.bat .
@echo " [CREATE] $@" @echo " [CREATE] $@"
$(qexec)$(SRC_PATH_BARE)/build/make/gen_msvs_proj.sh \ $(qexec)$(GEN_VCPROJ) \
--exe \ --exe \
--target=$(TOOLCHAIN) \ --target=$(TOOLCHAIN) \
--name=obj_int_extract \ --name=obj_int_extract \
...@@ -221,7 +221,7 @@ obj_int_extract.vcproj: $(SRC_PATH_BARE)/build/make/obj_int_extract.c ...@@ -221,7 +221,7 @@ obj_int_extract.vcproj: $(SRC_PATH_BARE)/build/make/obj_int_extract.c
-I. \ -I. \
-I"$(SRC_PATH_BARE)" \ -I"$(SRC_PATH_BARE)" \
PROJECTS-$(BUILD_LIBVPX) += obj_int_extract.vcproj PROJECTS-$(BUILD_LIBVPX) += obj_int_extract.$(VCPROJ_SFX)
vpx.def: $(call enabled,CODEC_EXPORTS) vpx.def: $(call enabled,CODEC_EXPORTS)
@echo " [CREATE] $@" @echo " [CREATE] $@"
...@@ -230,9 +230,9 @@ vpx.def: $(call enabled,CODEC_EXPORTS) ...@@ -230,9 +230,9 @@ vpx.def: $(call enabled,CODEC_EXPORTS)
--out=$@ $^ --out=$@ $^
CLEAN-OBJS += vpx.def CLEAN-OBJS += vpx.def
vpx.vcproj: $(CODEC_SRCS) vpx.def vpx.$(VCPROJ_SFX): $(CODEC_SRCS) vpx.def
@echo " [CREATE] $@" @echo " [CREATE] $@"
$(qexec)$(SRC_PATH_BARE)/build/make/gen_msvs_proj.sh \ $(qexec)$(GEN_VCPROJ) \
$(if $(CONFIG_SHARED),--dll,--lib) \ $(if $(CONFIG_SHARED),--dll,--lib) \
--target=$(TOOLCHAIN) \ --target=$(TOOLCHAIN) \
$(if $(CONFIG_STATIC_MSVCRT),--static-crt) \ $(if $(CONFIG_STATIC_MSVCRT),--static-crt) \
...@@ -243,10 +243,10 @@ vpx.vcproj: $(CODEC_SRCS) vpx.def ...@@ -243,10 +243,10 @@ vpx.vcproj: $(CODEC_SRCS) vpx.def
--out=$@ $(CFLAGS) $^ \ --out=$@ $(CFLAGS) $^ \
--src-path-bare="$(SRC_PATH_BARE)" \ --src-path-bare="$(SRC_PATH_BARE)" \
PROJECTS-$(BUILD_LIBVPX) += vpx.vcproj PROJECTS-$(BUILD_LIBVPX) += vpx.$(VCPROJ_SFX)
vpx.vcproj: vpx_config.asm vpx.$(VCPROJ_SFX): vpx_config.asm
vpx.vcproj: $(RTCD) vpx.$(VCPROJ_SFX): $(RTCD)
endif endif
else else
...@@ -403,9 +403,9 @@ testdata:: $(LIBVPX_TEST_DATA) ...@@ -403,9 +403,9 @@ testdata:: $(LIBVPX_TEST_DATA)
ifeq ($(CONFIG_EXTERNAL_BUILD),yes) ifeq ($(CONFIG_EXTERNAL_BUILD),yes)
ifeq ($(CONFIG_MSVS),yes) ifeq ($(CONFIG_MSVS),yes)
gtest.vcproj: $(SRC_PATH_BARE)/third_party/googletest/src/src/gtest-all.cc gtest.$(VCPROJ_SFX): $(SRC_PATH_BARE)/third_party/googletest/src/src/gtest-all.cc
@echo " [CREATE] $@" @echo " [CREATE] $@"
$(qexec)$(SRC_PATH_BARE)/build/make/gen_msvs_proj.sh \ $(qexec)$(GEN_VCPROJ) \
--lib \ --lib \
--target=$(TOOLCHAIN) \ --target=$(TOOLCHAIN) \
$(if $(CONFIG_STATIC_MSVCRT),--static-crt) \ $(if $(CONFIG_STATIC_MSVCRT),--static-crt) \
...@@ -414,14 +414,14 @@ gtest.vcproj: $(SRC_PATH_BARE)/third_party/googletest/src/src/gtest-all.cc ...@@ -414,14 +414,14 @@ gtest.vcproj: $(SRC_PATH_BARE)/third_party/googletest/src/src/gtest-all.cc
--ver=$(CONFIG_VS_VERSION) \ --ver=$(CONFIG_VS_VERSION) \
--src-path-bare="$(SRC_PATH_BARE)" \ --src-path-bare="$(SRC_PATH_BARE)" \
-D_VARIADIC_MAX=10 \ -D_VARIADIC_MAX=10 \
--out=gtest.vcproj $(SRC_PATH_BARE)/third_party/googletest/src/src/gtest-all.cc \ --out=gtest.$(VCPROJ_SFX) $(SRC_PATH_BARE)/third_party/googletest/src/src/gtest-all.cc \
-I. -I"$(SRC_PATH_BARE)/third_party/googletest/src/include" -I"$(SRC_PATH_BARE)/third_party/googletest/src" -I. -I"$(SRC_PATH_BARE)/third_party/googletest/src/include" -I"$(SRC_PATH_BARE)/third_party/googletest/src"
PROJECTS-$(CONFIG_MSVS) += gtest.vcproj PROJECTS-$(CONFIG_MSVS) += gtest.$(VCPROJ_SFX)
test_libvpx.vcproj: $(LIBVPX_TEST_SRCS) test_libvpx.$(VCPROJ_SFX): $(LIBVPX_TEST_SRCS)
@echo " [CREATE] $@" @echo " [CREATE] $@"
$(qexec)$(SRC_PATH_BARE)/build/make/gen_msvs_proj.sh \ $(qexec)$(GEN_VCPROJ) \
--exe \ --exe \
--target=$(TOOLCHAIN) \ --target=$(TOOLCHAIN) \
--name=test_libvpx \ --name=test_libvpx \
...@@ -433,7 +433,7 @@ test_libvpx.vcproj: $(LIBVPX_TEST_SRCS) ...@@ -433,7 +433,7 @@ test_libvpx.vcproj: $(LIBVPX_TEST_SRCS)
-I. -I"$(SRC_PATH_BARE)/third_party/googletest/src/include" \ -I. -I"$(SRC_PATH_BARE)/third_party/googletest/src/include" \
-L. -l$(CODEC_LIB) -lwinmm -l$(GTEST_LIB) $^ -L. -l$(CODEC_LIB) -lwinmm -l$(GTEST_LIB) $^
PROJECTS-$(CONFIG_MSVS) += test_libvpx.vcproj PROJECTS-$(CONFIG_MSVS) += test_libvpx.$(VCPROJ_SFX)
test:: testdata test:: testdata
@set -e; for t in $(addprefix $(TGT_OS:win64=x64)/Release/,$(notdir $(LIBVPX_TEST_BINS:.cc=.exe))); do $$t; done @set -e; for t in $(addprefix $(TGT_OS:win64=x64)/Release/,$(notdir $(LIBVPX_TEST_BINS:.cc=.exe))); do $$t; done
......
...@@ -9,14 +9,14 @@ ...@@ -9,14 +9,14 @@
## ##
# libvpx reverse dependencies (targets that depend on libvpx) # libvpx reverse dependencies (targets that depend on libvpx)
VPX_NONDEPS=$(addsuffix .vcproj,vpx gtest obj_int_extract) VPX_NONDEPS=$(addsuffix .$(VCPROJ_SFX),vpx gtest obj_int_extract)
VPX_RDEPS=$(foreach vcp,\ VPX_RDEPS=$(foreach vcp,\
$(filter-out $(VPX_NONDEPS),$^), --dep=$(vcp:.vcproj=):vpx) $(filter-out $(VPX_NONDEPS),$^), --dep=$(vcp:.$(VCPROJ_SFX)=):vpx)
vpx.sln: $(wildcard *.vcproj) vpx.sln: $(wildcard *.$(VCPROJ_SFX))
@echo " [CREATE] $@" @echo " [CREATE] $@"
$(SRC_PATH_BARE)/build/make/gen_msvs_sln.sh \ $(SRC_PATH_BARE)/build/make/gen_msvs_sln.sh \
$(if $(filter vpx.vcproj,$^),$(VPX_RDEPS)) \ $(if $(filter vpx.$(VCPROJ_SFX),$^),$(VPX_RDEPS)) \
--dep=vpx:obj_int_extract \ --dep=vpx:obj_int_extract \
--dep=test_libvpx:gtest \ --dep=test_libvpx:gtest \
--ver=$(CONFIG_VS_VERSION)\ --ver=$(CONFIG_VS_VERSION)\
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment