builder: minor fixes for mingw.

Search the lib-prefixed names of intl/iconv/charset libraries first to
avoid dlls being linked.

Update toolchain files to include the common source by full path, fixes
using them as toolchains for other projects broken in 3edd9ba7.

Update URL for nasm, use newer jpeg-turbo, tiff and wx.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
This commit is contained in:
Rafael Kitover 2020-02-02 02:14:03 +00:00
parent 3ca67b9d5d
commit 213f47ec96
No known key found for this signature in database
GPG Key ID: 08AB596679D86240
8 changed files with 23 additions and 17 deletions

View File

@ -422,9 +422,9 @@ if(ENABLE_NLS)
endif()
if(ENABLE_LINK OR ENABLE_WX)
find_path(LIBINTL_INC libintl.h)
find_library(LIBINTL_LIB NAMES intl libintl)
find_library(LIBICONV_LIB NAMES iconv libiconv)
find_library(LIBCHARSET_LIB NAMES charset libcharset)
find_library(LIBINTL_LIB NAMES libintl intl)
find_library(LIBICONV_LIB NAMES libiconv iconv)
find_library(LIBCHARSET_LIB NAMES libcharset charset)
if(LIBINTL_LIB)
list(APPEND CMAKE_REQUIRED_LIBRARIES ${LIBINTL_LIB})
list(APPEND VBAMCORE_LIBS ${LIBINTL_LIB})

View File

@ -1,4 +1,6 @@
SET(CMAKE_SYSTEM_NAME Windows)
set(CMAKE_SYSTEM_NAME Windows)
set(CMAKE_SYSTEM_PROCESSOR ${CROSS_ARCH})
set(COMPILER_PREFIX "${CROSS_ARCH}-w64-mingw32")
@ -7,9 +9,9 @@ unset(CMAKE_C_COMPILER CACHE)
unset(CMAKE_CXX_COMPILER CACHE)
unset(PKG_CONFIG_EXECUTABLE CACHE)
# which compilers to use for C and C++
find_program(CMAKE_RC_COMPILER NAMES ${COMPILER_PREFIX}-windres)
find_program(CMAKE_C_COMPILER NAMES ${COMPILER_PREFIX}-gcc)
# Which compilers to use for C and C++.
find_program(CMAKE_RC_COMPILER NAMES ${COMPILER_PREFIX}-windres)
find_program(CMAKE_C_COMPILER NAMES ${COMPILER_PREFIX}-gcc)
find_program(CMAKE_CXX_COMPILER NAMES ${COMPILER_PREFIX}-g++)
SET(CMAKE_FIND_ROOT_PATH
@ -51,8 +53,8 @@ endforeach()
set(wxWidgets_CONFIG_EXECUTABLE ${wx_conf} CACHE FILEPATH "path to wx-config script for the desired wxWidgets configuration" FORCE)
# find the right static zlib
if(CMAKE_TOOLCHAIN_FILE MATCHES -static)
# find the right static zlib
foreach(p ${CMAKE_FIND_ROOT_PATH})
if(EXISTS ${p}/lib/libz.a)
set(ZLIB_ROOT ${p} CACHE FILEPATH "where to find zlib" FORCE)

View File

@ -1 +1 @@
include(Toolchain-cross-MinGW-w64-i686)
include(${CMAKE_CURRENT_LIST_DIR}/Toolchain-cross-MinGW-w64-i686.cmake)

View File

@ -1,2 +1,3 @@
set(CROSS_ARCH i686)
include(Toolchain-cross-MinGW-w64-common)
set(CMAKE_SIZEOF_VOID_P 4)
include(${CMAKE_CURRENT_LIST_DIR}/Toolchain-cross-MinGW-w64-common.cmake)

View File

@ -1 +1 @@
include(Toolchain-cross-MinGW-w64-x86_64)
include(${CMAKE_CURRENT_LIST_DIR}/Toolchain-cross-MinGW-w64-x86_64.cmake)

View File

@ -1,2 +1,3 @@
set(CROSS_ARCH x86_64)
include(Toolchain-cross-MinGW-w64-common)
set(CMAKE_SIZEOF_VOID_P 8)
include(${CMAKE_CURRENT_LIST_DIR}/Toolchain-cross-MinGW-w64-common.cmake)

View File

@ -130,7 +130,7 @@ DISTS=$DISTS'
gperf http://ftp.gnu.org/pub/gnu/gperf/gperf-3.1.tar.gz bin/gperf
libicu https://github.com/unicode-org/icu/releases/download/release-65-1/icu4c-65_1-src.tgz lib/libicud*t*.a
pkgconfig https://pkgconfig.freedesktop.org/releases/pkg-config-0.29.2.tar.gz bin/pkg-config
nasm http://repo.or.cz/nasm.git/snapshot/53371ddd17b685f8880c22b8b698e494e0f1059b.tar.gz bin/nasm
nasm https://www.nasm.us/pub/nasm/snapshots/20191023/nasm-2.15rc0-20191023.tar.xz bin/nasm
yasm http://www.tortall.net/projects/yasm/releases/yasm-1.3.0.tar.gz bin/yasm
pcre https://ftp.pcre.org/pub/pcre/pcre-8.41.tar.bz2 lib/libpcre.a
libffi ftp://sourceware.org/pub/libffi/libffi-3.2.1.tar.gz lib/libffi.a
@ -143,8 +143,8 @@ DISTS=$DISTS'
docbook2x https://downloads.sourceforge.net/project/docbook2x/docbook2x/0.8.8/docbook2X-0.8.8.tar.gz bin/docbook2man
expat https://github.com/libexpat/libexpat/archive/R_2_2_4.tar.gz lib/libexpat.a
libpng https://download.sourceforge.net/libpng/libpng-1.6.37.tar.xz lib/libpng.a
libjpeg-turbo https://github.com/libjpeg-turbo/libjpeg-turbo/archive/1.5.2.tar.gz lib/libjpeg.a
libtiff http://download.osgeo.org/libtiff/tiff-4.0.9.tar.gz lib/libtiff.a
libjpeg-turbo https://github.com/libjpeg-turbo/libjpeg-turbo/archive/2.0.4.tar.gz lib/libjpeg.a
libtiff http://download.osgeo.org/libtiff/tiff-4.1.0.tar.gz lib/libtiff.a
# libcroco http://ftp.gnome.org/pub/gnome/sources/libcroco/0.6/libcroco-0.6.12.tar.xz lib/libcroco-0.6.a
libuuid https://downloads.sourceforge.net/project/libuuid/libuuid-1.0.3.tar.gz lib/libuuid.a
freetype http://download.savannah.gnu.org/releases/freetype/freetype-2.10.0.tar.bz2 lib/libfreetype.a
@ -183,7 +183,7 @@ DISTS=$DISTS'
harfbuzz https://www.freedesktop.org/software/harfbuzz/release/harfbuzz-1.7.5.tar.bz2 lib/libharfbuzz.a
sfml https://github.com/SFML/SFML/archive/013d053277c980946bc7761a2a088f1cbb788f8c.tar.gz lib/libsfml-system-s.a
shared-mime-info http://freedesktop.org/~hadess/shared-mime-info-1.9.tar.xz bin/update-mime-database
wxwidgets https://github.com/wxWidgets/wxWidgets/archive/1753ed403765269bf9f6d3bb540f7e77a8758e39.tar.gz lib/libwx_baseu-3.1*.a
wxwidgets https://github.com/wxWidgets/wxWidgets/archive/55efc9e60742d0de61e39556084d09f2332b99be.tar.gz lib/libwx_baseu-3.1*.a
graphite2 https://github.com/silnrsi/graphite/archive/ce0e793f22127d7ba6422d440bd83b58f864ef7e.tar.gz lib/libgraphite2.a
xvidcore http://downloads.xvid.org/downloads/xvidcore-1.3.5.tar.bz2 lib/libxvidcore.a
fribidi https://github.com/fribidi/fribidi/releases/download/v1.0.1/fribidi-1.0.1.tar.bz2 lib/libfribidi.a
@ -373,6 +373,8 @@ DIST_ARGS="$DIST_ARGS
doxygen -DICONV_ACCEPTS_NONCONST_INPUT:BOOL=FALSE -DICONV_ACCEPTS_CONST_INPUT:BOOL=TRUE
sfml -DSFML_USE_SYSTEM_DEPS=TRUE
libcroco --disable-Bsymbolic
libjpeg-turbo -DWITH_JPEG8=ON -DWITH_SIMD=OFF
libtiff --disable-lzma
freetype --with-harfbuzz=no
harfbuzz --with-cairo=no --with-icu=no
graphite2 -DGRAPHITE2_NFILEFACE=ON -DGRAPHITE2_TESTS=OFF -DGRAPHITE2_DOCS=OFF

View File

@ -62,7 +62,7 @@ export BUILD_ENV
export CONFIGURE_REQUIRED_ARGS="--host=${target_arch}"
export CMAKE_REQUIRED_ARGS="$CMAKE_REQUIRED_ARGS -DCMAKE_TOOLCHAIN_FILE='$(perl -MCwd=abs_path -le "print abs_path(q{${0%/*}/../../cmake/Toolchain-cross-MinGW-w64-${target_cpu}.cmake})")'"
export CMAKE_REQUIRED_ARGS="$CMAKE_REQUIRED_ARGS -DCMAKE_TOOLCHAIN_FILE='$(perl -MCwd=abs_path -le "print abs_path(q{${0%/*}/../../cmake/Toolchain-cross-MinGW-w64-${target_cpu}-static.cmake})")'"
export MESON_BASE_ARGS=""