Commit 41855ed9 authored by Urs Fleisch's avatar Urs Fleisch
Browse files

Fix build on Windows using msys2.

parent 811fa6fa
...@@ -59,7 +59,7 @@ libvorbis_patchlevel=2 ...@@ -59,7 +59,7 @@ libvorbis_patchlevel=2
libav_version=11.3 libav_version=11.3
libav_patchlevel=1 libav_patchlevel=1
libflac_version=1.3.1 libflac_version=1.3.1
libflac_patchlevel=1 libflac_patchlevel=2
id3lib_version=3.8.3 id3lib_version=3.8.3
id3lib_patchlevel=16 id3lib_patchlevel=16
taglib_version=1.9.1 taglib_version=1.9.1
...@@ -2033,7 +2033,11 @@ echo "### Building id3lib" ...@@ -2033,7 +2033,11 @@ echo "### Building id3lib"
cd id3lib-${id3lib_version}/ cd id3lib-${id3lib_version}/
autoconf autoconf
test -f Makefile || CPPFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib ./configure --enable-shared=no --enable-static=yes $ENABLE_DEBUG $CONFIGURE_OPTIONS configure_args="--enable-shared=no --enable-static=yes $ENABLE_DEBUG $CONFIGURE_OPTIONS"
if test $kernel = "MINGW"; then
configure_args="$configure_args --build=mingw32"
fi
test -f Makefile || CPPFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib ./configure $configure_args
SED=sed make SED=sed make
mkdir -p inst mkdir -p inst
make install DESTDIR=`pwd`/inst make install DESTDIR=`pwd`/inst
......
...@@ -8,6 +8,13 @@ foreach (_currentPoFile ${_poFiles}) ...@@ -8,6 +8,13 @@ foreach (_currentPoFile ${_poFiles})
endforeach (_currentPoFile) endforeach (_currentPoFile)
if (APPLE OR WIN32) if (APPLE OR WIN32)
if (NOT QT_TRANSLATIONS_DIR)
get_target_property(QT_TRANSLATIONS_DIR Qt5::qmake LOCATION)
get_filename_component(QT_TRANSLATIONS_DIR ${QT_TRANSLATIONS_DIR} PATH)
get_filename_component(QT_TRANSLATIONS_DIR ${QT_TRANSLATIONS_DIR} PATH)
set(QT_TRANSLATIONS_DIR "${QT_TRANSLATIONS_DIR}/translations")
endif (NOT QT_TRANSLATIONS_DIR)
# Also copy or convert the Qt language files from the Qt installation. # Also copy or convert the Qt language files from the Qt installation.
set(_qtQmFiles) set(_qtQmFiles)
set(_qtTsFiles) set(_qtTsFiles)
......
...@@ -218,5 +218,8 @@ if (WIN32) ...@@ -218,5 +218,8 @@ if (WIN32)
get_filename_component(_qtBinDir ${_qtBinDir} PATH) get_filename_component(_qtBinDir ${_qtBinDir} PATH)
install(DIRECTORY "${_qtBinDir}/icu_reduced/" install(DIRECTORY "${_qtBinDir}/icu_reduced/"
DESTINATION ${WITH_BINDIR} OPTIONAL) DESTINATION ${WITH_BINDIR} OPTIONAL)
# Install missing Qt5Xml.dll file.
install(FILES "${_qtBinDir}/Qt5Xml.dll"
DESTINATION ${WITH_BINDIR})
endif (NOT HAVE_QT5) endif (NOT HAVE_QT5)
endif (WIN32) endif (WIN32)
...@@ -13,6 +13,10 @@ if(WITH_ID3LIB) ...@@ -13,6 +13,10 @@ if(WITH_ID3LIB)
string(REGEX MATCH "(i586-mingw32msvc-g\\+\\+|i686-w64-mingw32-g\\+\\+)" _crossMingwMatch "${CMAKE_CXX_COMPILER}") string(REGEX MATCH "(i586-mingw32msvc-g\\+\\+|i686-w64-mingw32-g\\+\\+)" _crossMingwMatch "${CMAKE_CXX_COMPILER}")
if (NOT _crossMingwMatch) if (NOT _crossMingwMatch)
set(ID3LIB_LIBRARIES ${ID3LIB_LIBRARIES} -liconv) set(ID3LIB_LIBRARIES ${ID3LIB_LIBRARIES} -liconv)
# libiconv-2.dll is at the same place where the compiler is, C:\msys64\mingw32\bin
get_filename_component(_mingw_bin_dir ${CMAKE_C_COMPILER} DIRECTORY)
install(FILES "${_mingw_bin_dir}/libiconv-2.dll"
DESTINATION ${WITH_BINDIR})
endif (NOT _crossMingwMatch) endif (NOT _crossMingwMatch)
elseif (APPLE) elseif (APPLE)
set(ID3LIB_LIBRARIES ${ID3LIB_LIBRARIES} -liconv) set(ID3LIB_LIBRARIES ${ID3LIB_LIBRARIES} -liconv)
......
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