Skip to content

Commit

Permalink
configure: always enable gnu_windres if available
Browse files Browse the repository at this point in the history
Use the appropiate Makefile variable to ensure the resource file is
only built into shared libraries instead.
  • Loading branch information
BtbN committed Aug 13, 2022
1 parent 6ded80a commit b77fff4
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -5571,7 +5571,7 @@ case $target_os in
# Cannot build both shared and static libs when using dllimport.
disable static
fi
enabled shared && ! enabled small && test_cmd $windres --version && enable gnu_windres
! enabled small && test_cmd $windres --version && enable gnu_windres
enabled x86_32 && check_ldflags -Wl,--large-address-aware
shlibdir_default="$bindir_default"
SLIBPREF=""
Expand Down Expand Up @@ -5650,7 +5650,7 @@ case $target_os in
SHFLAGS='-shared -Wl,--out-implib,$(SUBDIR)lib$(FULLNAME).dll.a'
enabled x86_64 && objformat="win64" || objformat="win32"
enable dos_paths
enabled shared && ! enabled small && test_cmd $windres --version && enable gnu_windres
! enabled small && test_cmd $windres --version && enable gnu_windres
add_cppflags -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600
;;
*-dos|freedos|opendos)
Expand Down
2 changes: 1 addition & 1 deletion libavcodec/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -1218,7 +1218,7 @@ OBJS-$(HAVE_THREADS) += pthread.o pthread_slice.o pthread_fram
OBJS-$(CONFIG_FRAME_THREAD_ENCODER) += frame_thread_encoder.o

# Windows resource file
SLIBOBJS-$(HAVE_GNU_WINDRES) += avcodecres.o
SHLIBOBJS-$(HAVE_GNU_WINDRES) += avcodecres.o

SKIPHEADERS += %_tablegen.h \
%_tables.h \
Expand Down
2 changes: 1 addition & 1 deletion libavdevice/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ OBJS-$(CONFIG_LIBDC1394_INDEV) += libdc1394.o
SHLIBOBJS-$(CONFIG_DECKLINK_INDEV) += reverse.o

# Windows resource file
SLIBOBJS-$(HAVE_GNU_WINDRES) += avdeviceres.o
SHLIBOBJS-$(HAVE_GNU_WINDRES) += avdeviceres.o

SKIPHEADERS += decklink_common.h
SKIPHEADERS-$(CONFIG_DECKLINK) += decklink_enc.h decklink_dec.h \
Expand Down
2 changes: 1 addition & 1 deletion libavfilter/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -605,7 +605,7 @@ OBJS-$(CONFIG_MOVIE_FILTER) += src_movie.o
SHLIBOBJS += log2_tab.o

# Windows resource file
SLIBOBJS-$(HAVE_GNU_WINDRES) += avfilterres.o
SHLIBOBJS-$(HAVE_GNU_WINDRES) += avfilterres.o

SKIPHEADERS-$(CONFIG_LCMS2) += fflcms2.h
SKIPHEADERS-$(CONFIG_LIBVIDSTAB) += vidstabutils.h
Expand Down
2 changes: 1 addition & 1 deletion libavformat/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -714,7 +714,7 @@ SHLIBOBJS-$(CONFIG_SPDIF_MUXER) += dca_sample_rate_tab.o
OBJS-$(CONFIG_IEC61883_INDEV) += dv.o

# Windows resource file
SLIBOBJS-$(HAVE_GNU_WINDRES) += avformatres.o
SHLIBOBJS-$(HAVE_GNU_WINDRES) += avformatres.o

SKIPHEADERS-$(CONFIG_IMF_DEMUXER) += imf.h
SKIPHEADERS-$(CONFIG_FFRTMPCRYPT_PROTOCOL) += rtmpdh.h
Expand Down
2 changes: 1 addition & 1 deletion libavutil/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ OBJS-$(!CONFIG_VULKAN) += hwcontext_stub.o
OBJS += $(COMPAT_OBJS:%=../compat/%)

# Windows resource file
SLIBOBJS-$(HAVE_GNU_WINDRES) += avutilres.o
SHLIBOBJS-$(HAVE_GNU_WINDRES) += avutilres.o

SKIPHEADERS += objc.h
SKIPHEADERS-$(HAVE_CUDA_H) += hwcontext_cuda.h
Expand Down
2 changes: 1 addition & 1 deletion libpostproc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ OBJS = postprocess.o \
version.o \

# Windows resource file
SLIBOBJS-$(HAVE_GNU_WINDRES) += postprocres.o
SHLIBOBJS-$(HAVE_GNU_WINDRES) += postprocres.o
2 changes: 1 addition & 1 deletion libswresample/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ OBJS-$(CONFIG_LIBSOXR) += soxr_resample.o
SHLIBOBJS += log2_tab.o

# Windows resource file
SLIBOBJS-$(HAVE_GNU_WINDRES) += swresampleres.o
SHLIBOBJS-$(HAVE_GNU_WINDRES) += swresampleres.o

TESTPROGS = swresample
2 changes: 1 addition & 1 deletion libswscale/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ OBJS = alphablend.o \
SHLIBOBJS += log2_tab.o

# Windows resource file
SLIBOBJS-$(HAVE_GNU_WINDRES) += swscaleres.o
SHLIBOBJS-$(HAVE_GNU_WINDRES) += swscaleres.o

TESTPROGS = colorspace \
floatimg_cmp \
Expand Down

0 comments on commit b77fff4

Please sign in to comment.