cmake: Fix fedora mingw build + misc improvements.
Use the 3.x wxwidgets mingw package in installdeps. Add the win64 alias to installdeps for 64 bit mingw builds, like the win32 alias for 32 bit mingw builds. Check CROSS_ARCH in Architecture.cmake, set by our mingw toolchains. Disable LTO by default for all mingw builds, not just amd64, because it is unfortunately broken on i686 as well now. Search for heuristically the most appropriate wx-config and set wxWidgets_CONFIG_EXECUTABLE accordingly in the mingw toolchains. Refactor the mingw toolchains somewhat, put common code into a common file, add static toolchains. For static toolchains, also search for a static zlib and set ZLIB_ROOT. Change installdeps instructions to use ninja instead of make. Add ninja to all target dependencies where it was missing, this may be incorrect in a couple of the rarely used targets, if this is the case the affected users are free to open an issue. Also start using ninja on travis instead of make, except for libretro which uses a GNU Makefile. Signed-off-by: Rafael Kitover <rkitover@gmail.com>
This commit is contained in:
parent
ba9c10d566
commit
3edd9ba756
|
@ -57,8 +57,8 @@ script:
|
|||
- mkdir -p -- "$DIR"
|
||||
- cd -- "$DIR"
|
||||
- if [ "$BUILD_ENV" != libretro ]; then $CMAKE $CMAKE_ARGS ..; fi
|
||||
- make
|
||||
- if [ "$BUILD_ENV" != libretro ]; then make install DESTDIR=/tmp/VBAM; fi
|
||||
- if [ "$BUILD_ENV" != libretro ]; then ninja; else make; fi
|
||||
- if [ "$BUILD_ENV" != libretro ]; then DESTDIR=/tmp/VBAM ninja install; fi
|
||||
- |
|
||||
if [ "$BUILD_ENV" = mac ]; then
|
||||
./$PRGNAM.app/Contents/MacOS/$PRGNAM --help
|
||||
|
@ -68,7 +68,7 @@ script:
|
|||
|
||||
env:
|
||||
global:
|
||||
- CMAKE_ARGS=""
|
||||
- CMAKE_ARGS="-G Ninja"
|
||||
- ENABLE_SDL=1
|
||||
- MAKEFLAGS="-j2"
|
||||
- PRGNAM=visualboyadvance-m
|
||||
|
|
|
@ -2,6 +2,10 @@ if(COMMAND cmake_policy)
|
|||
cmake_policy(SET CMP0003 NEW) # link to full path of libs
|
||||
cmake_policy(SET CMP0005 NEW) # escapes in add_definitions
|
||||
|
||||
if(POLICY CMP0074)
|
||||
cmake_policy(SET CMP0074 NEW) # use Package_ROOT if set
|
||||
endif()
|
||||
|
||||
if(POLICY CMP0077)
|
||||
cmake_policy(SET CMP0077 NEW) # use vars for options
|
||||
endif()
|
||||
|
@ -30,7 +34,7 @@ include(Set-Toolchain-vcpkg)
|
|||
|
||||
set(VBAM_STATIC_DEFAULT OFF)
|
||||
|
||||
if(VCPKG_TARGET_TRIPLET MATCHES -static OR CMAKE_TOOLCHAIN_FILE MATCHES mxe)
|
||||
if(VCPKG_TARGET_TRIPLET MATCHES -static OR CMAKE_TOOLCHAIN_FILE MATCHES "mxe|-static")
|
||||
set(VBAM_STATIC_DEFAULT ON)
|
||||
endif()
|
||||
|
||||
|
@ -66,18 +70,14 @@ if(VBAM_STATIC)
|
|||
set(FFMPEG_STATIC ON)
|
||||
set(SSP_STATIC ON)
|
||||
set(OPENAL_STATIC ON)
|
||||
set_property(GLOBAL PROPERTY LINK_SEARCH_START_STATIC ON)
|
||||
set_property(GLOBAL PROPERTY LINK_SEARCH_END_STATIC ON)
|
||||
|
||||
if(NOT MSVC)
|
||||
list(INSERT CMAKE_FIND_LIBRARY_SUFFIXES 0 .a)
|
||||
endif()
|
||||
|
||||
set(ENABLE_BUNDLED_LIBS_DEFAULT OFF)
|
||||
|
||||
# on visual studio use all bundled stuff
|
||||
if(MSVC)
|
||||
set(ENABLE_BUNDLED_LIBS_DEFAULT ON)
|
||||
endif()
|
||||
|
||||
# XXX: do some stuff with this
|
||||
#option(ENABLE_BUNDLED_LIBS "Use bundled libraries instead of system libraries" ${ENABLE_BUNDLED_LIBS_DEFAULT})
|
||||
|
||||
# use ccache if available, and not already enabled on the command line
|
||||
# but not with ninja and msys ccache on msys2
|
||||
if(NOT (WIN32 AND NOT "$ENV{MSYSTEM_PREFIX}" STREQUAL "" AND CMAKE_GENERATOR STREQUAL Ninja))
|
||||
|
@ -186,7 +186,7 @@ set(LTO_DEFAULT ON)
|
|||
|
||||
# gcc lto produces buggy binaries for 64 bit mingw
|
||||
# and we generally don't want it when debugging because it makes linking slow
|
||||
if(CMAKE_BUILD_TYPE MATCHES Debug OR (WIN32 AND CMAKE_COMPILER_IS_GNUCXX AND AMD64))
|
||||
if(CMAKE_BUILD_TYPE MATCHES Debug OR (WIN32 AND CMAKE_COMPILER_IS_GNUCXX))
|
||||
set(LTO_DEFAULT OFF)
|
||||
endif()
|
||||
|
||||
|
|
|
@ -7,6 +7,10 @@ if(NOT CMAKE_SYSTEM_PROCESSOR)
|
|||
else()
|
||||
set(CMAKE_SYSTEM_PROCESSOR x86_64)
|
||||
endif()
|
||||
elseif(CROSS_ARCH STREQUAL x86_64)
|
||||
set(CMAKE_SYSTEM_PROCESSOR x86_64)
|
||||
elseif(CROSS_ARCH STREQUAL i686)
|
||||
set(CMAKE_SYSTEM_PROCESSOR i686)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
|
|
@ -0,0 +1,76 @@
|
|||
SET(CMAKE_SYSTEM_NAME Windows)
|
||||
|
||||
set(COMPILER_PREFIX "${CROSS_ARCH}-w64-mingw32")
|
||||
|
||||
unset(CMAKE_RC_COMPILER CACHE)
|
||||
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)
|
||||
find_program(CMAKE_CXX_COMPILER NAMES ${COMPILER_PREFIX}-g++)
|
||||
|
||||
SET(CMAKE_FIND_ROOT_PATH
|
||||
/usr/${COMPILER_PREFIX}
|
||||
/usr/${COMPILER_PREFIX}/usr
|
||||
/usr/${COMPILER_PREFIX}/sys-root/mingw
|
||||
/usr/local/opt/mingw-w64/toolchain-${CROSS_ARCH}/${COMPILER_PREFIX}
|
||||
/home/linuxbrew/.linuxbrew/opt/mingw-w64/toolchain-${CROSS_ARCH}/${COMPILER_PREFIX}
|
||||
$ENV{HOME}/.linuxbrew/opt/mingw-w64/toolchain-${CROSS_ARCH}/${COMPILER_PREFIX}
|
||||
)
|
||||
|
||||
# find wx-config
|
||||
foreach(p ${CMAKE_FIND_ROOT_PATH})
|
||||
file(GLOB paths ${p}/lib/wx/config/${COMPILER_PREFIX}-msw-*)
|
||||
|
||||
list(APPEND wx_confs ${paths})
|
||||
endforeach()
|
||||
|
||||
foreach(p ${wx_confs})
|
||||
if(CMAKE_TOOLCHAIN_FILE MATCHES -static)
|
||||
string(REGEX MATCH "(static-)?([0-9]+\\.?)+$" wx_conf_ver ${p})
|
||||
else()
|
||||
string(REGEX MATCH "([0-9]+\\.?)+$" wx_conf_ver ${p})
|
||||
endif()
|
||||
|
||||
list(APPEND wx_conf_vers ${wx_conf_ver})
|
||||
endforeach()
|
||||
|
||||
list(SORT wx_conf_vers)
|
||||
list(REVERSE wx_conf_vers)
|
||||
list(GET wx_conf_vers 0 wx_conf_ver)
|
||||
|
||||
foreach(p ${wx_confs})
|
||||
if(p MATCHES "${wx_conf_ver}$")
|
||||
set(wx_conf ${p})
|
||||
break()
|
||||
endif()
|
||||
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)
|
||||
foreach(p ${CMAKE_FIND_ROOT_PATH})
|
||||
if(EXISTS ${p}/lib/libz.a)
|
||||
set(ZLIB_ROOT ${p} CACHE FILEPATH "where to find zlib" FORCE)
|
||||
break()
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
if(CMAKE_PREFIX_PATH)
|
||||
set(CMAKE_FIND_ROOT_PATH ${CMAKE_FIND_ROOT_PATH} ${CMAKE_PREFIX_PATH})
|
||||
endif()
|
||||
|
||||
# adjust the default behaviour of the FIND_XXX() commands:
|
||||
# search headers and libraries in the target environment, search
|
||||
# programs in the host environment too
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM BOTH)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||
|
||||
# pkg-config may be under the prefix
|
||||
find_program(PKG_CONFIG_EXECUTABLE NAMES ${COMPILER_PREFIX}-pkg-config)
|
|
@ -0,0 +1 @@
|
|||
include(Toolchain-cross-MinGW-w64-i686)
|
|
@ -1,30 +1,2 @@
|
|||
SET(CMAKE_SYSTEM_NAME Windows)
|
||||
|
||||
set(CROSS_ARCH i686)
|
||||
set(COMPILER_PREFIX "${CROSS_ARCH}-w64-mingw32")
|
||||
|
||||
unset(CMAKE_RC_COMPILER CACHE)
|
||||
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)
|
||||
find_program(CMAKE_CXX_COMPILER NAMES ${COMPILER_PREFIX}-g++)
|
||||
|
||||
SET(CMAKE_FIND_ROOT_PATH /usr/${COMPILER_PREFIX} /usr/${COMPILER_PREFIX}/usr /usr/${COMPILER_PREFIX}/sys-root/mingw /usr/local/opt/mingw-w64/toolchain-${CROSS_ARCH}/${COMPILER_PREFIX} /home/linuxbrew/.linuxbrew/opt/mingw-w64/toolchain-${CROSS_ARCH}/${COMPILER_PREFIX} $ENV{HOME}/.linuxbrew/opt/mingw-w64/toolchain-${CROSS_ARCH}/${COMPILER_PREFIX})
|
||||
|
||||
if(CMAKE_PREFIX_PATH)
|
||||
set(CMAKE_FIND_ROOT_PATH ${CMAKE_FIND_ROOT_PATH} ${CMAKE_PREFIX_PATH})
|
||||
endif()
|
||||
|
||||
# adjust the default behaviour of the FIND_XXX() commands:
|
||||
# search headers and libraries in the target environment, search
|
||||
# programs in the host environment too
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM BOTH)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||
|
||||
# pkg-config may be under the prefix
|
||||
find_program(PKG_CONFIG_EXECUTABLE NAMES ${COMPILER_PREFIX}-pkg-config)
|
||||
include(Toolchain-cross-MinGW-w64-common)
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
include(Toolchain-cross-MinGW-w64-x86_64)
|
|
@ -1,30 +1,2 @@
|
|||
SET(CMAKE_SYSTEM_NAME Windows)
|
||||
|
||||
set(CROSS_ARCH x86_64)
|
||||
set(COMPILER_PREFIX "${CROSS_ARCH}-w64-mingw32")
|
||||
|
||||
unset(CMAKE_RC_COMPILER CACHE)
|
||||
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)
|
||||
find_program(CMAKE_CXX_COMPILER NAMES ${COMPILER_PREFIX}-g++)
|
||||
|
||||
SET(CMAKE_FIND_ROOT_PATH /usr/${COMPILER_PREFIX} /usr/${COMPILER_PREFIX}/usr /usr/${COMPILER_PREFIX}/sys-root/mingw /usr/local/opt/mingw-w64/toolchain-${CROSS_ARCH}/${COMPILER_PREFIX} /home/linuxbrew/.linuxbrew/opt/mingw-w64/toolchain-${CROSS_ARCH}/${COMPILER_PREFIX} $ENV{HOME}/.linuxbrew/opt/mingw-w64/toolchain-${CROSS_ARCH}/${COMPILER_PREFIX})
|
||||
|
||||
if(CMAKE_PREFIX_PATH)
|
||||
set(CMAKE_FIND_ROOT_PATH ${CMAKE_FIND_ROOT_PATH} ${CMAKE_PREFIX_PATH})
|
||||
endif()
|
||||
|
||||
# adjust the default behaviour of the FIND_XXX() commands:
|
||||
# search headers and libraries in the target environment, search
|
||||
# programs in the host environment too
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM BOTH)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||
|
||||
# pkg-config may be under the prefix
|
||||
find_program(PKG_CONFIG_EXECUTABLE NAMES ${COMPILER_PREFIX}-pkg-config)
|
||||
include(Toolchain-cross-MinGW-w64-common)
|
||||
|
|
40
installdeps
40
installdeps
|
@ -108,7 +108,8 @@ Examples:
|
|||
[32m./installdeps [1;35mm32[0m # make a 32 bit binary for the host OS
|
||||
[32m./installdeps [1;35mwin32[0m # cross-compile for 32 bit windows (Debian/Ubuntu, Arch Linux or MSYS2)
|
||||
[32m./installdeps [1;35mMinGW-w64-i686[0m # likewise
|
||||
[32m./installdeps [1;35mMinGW-w64-x86_64[0m # cross-compile for 64 bit windows (Debian/Ubuntu, Arch Linux or MSYS2)
|
||||
[32m./installdeps [1;35mwin64[0m # cross-compile for 64 bit windows (Debian/Ubuntu, Arch Linux or MSYS2)
|
||||
[32m./installdeps [1;35mMinGW-w64-x86_64[0m # likewise
|
||||
EOF
|
||||
}
|
||||
|
||||
|
@ -260,7 +261,7 @@ check_cross() {
|
|||
fi
|
||||
|
||||
case "$target" in
|
||||
win32|mingw*)
|
||||
win32|win64|mingw*)
|
||||
if [ -z "$arch_linux" -a -z "$msys2" -a -z "$debian" -a -z "$fedora" ]; then
|
||||
error 'win32 cross compiling targets are only supported on Debian/Ubuntu, Fedora, Arch and MSYS2 at the moment'
|
||||
fi
|
||||
|
@ -269,12 +270,15 @@ check_cross() {
|
|||
win32)
|
||||
target='mingw-w64-i686'
|
||||
;;
|
||||
win64)
|
||||
target='mingw-w64-x86_64'
|
||||
;;
|
||||
mingw-w64-i686)
|
||||
;;
|
||||
mingw-w64-x86_64)
|
||||
;;
|
||||
*)
|
||||
error "target must be one of 'm32', 'win32', 'MinGW-w64-i686' or 'MinGW-w64-x86_64'"
|
||||
error "target must be one of 'm32', 'win32', 'MinGW-w64-i686', 'win64' or 'MinGW-w64-x86_64'"
|
||||
;;
|
||||
esac
|
||||
|
||||
|
@ -331,7 +335,7 @@ debian_installdeps() {
|
|||
wx_lib_dev=libwxgtk3.0-dev
|
||||
fi
|
||||
|
||||
pkgs="build-essential g++ nasm cmake ccache gettext zlib1g-dev libgl1-mesa-dev libgettextpo-dev libpng-dev libsdl2-dev libsdl2-2.0 libglu1-mesa-dev libglu1-mesa libgles2-mesa-dev libsfml-dev $sfml_libs $glew_lib $wx_lib $wx_lib_dev libgtk2.0-dev libgtk-3-dev ccache zip"
|
||||
pkgs="build-essential g++ nasm cmake ccache gettext zlib1g-dev libgl1-mesa-dev libgettextpo-dev libpng-dev libsdl2-dev libsdl2-2.0 libglu1-mesa-dev libglu1-mesa libgles2-mesa-dev libsfml-dev $sfml_libs $glew_lib $wx_lib $wx_lib_dev libgtk2.0-dev libgtk-3-dev ccache zip ninja-build"
|
||||
|
||||
[ -n "$ENABLE_OPENAL" ] && pkgs="$pkgs libopenal-dev"
|
||||
[ -n "$ENABLE_FFMPEG" ] && pkgs="$pkgs libavcodec-dev libavformat-dev libswscale-dev libavutil-dev $libswresample_dev"
|
||||
|
@ -391,7 +395,7 @@ debian_installdeps() {
|
|||
done
|
||||
check sudo apt-get --allow-unauthenticated -qq -y update
|
||||
# native wx-common needed for wxrc executable
|
||||
check sudo apt-get --allow-unauthenticated -qy install build-essential cmake ccache wx-common "$@"
|
||||
check sudo apt-get --allow-unauthenticated -qy install build-essential cmake ninja-build ccache wx-common "$@"
|
||||
fi
|
||||
|
||||
build_instructions
|
||||
|
@ -544,18 +548,18 @@ fedora_installdeps() {
|
|||
case "$target" in
|
||||
mingw-w64-i686)
|
||||
target=mingw32
|
||||
cmake_flags="$cmake_flags -DCMAKE_TOOLCHAIN_FILE=../cmake/Toolchain-cross-MinGW-w64-i686.cmake"
|
||||
cmake_flags="$cmake_flags -DCMAKE_TOOLCHAIN_FILE=../cmake/Toolchain-cross-MinGW-w64-i686-static.cmake"
|
||||
;;
|
||||
mingw-w64-x86_64)
|
||||
target=mingw64
|
||||
cmake_flags="$cmake_flags -DCMAKE_TOOLCHAIN_FILE=../cmake/Toolchain-cross-MinGW-w64-x86_64.cmake"
|
||||
cmake_flags="$cmake_flags -DCMAKE_TOOLCHAIN_FILE=../cmake/Toolchain-cross-MinGW-w64-x86_64-static.cmake"
|
||||
;;
|
||||
*)
|
||||
error 'unknown cross target (this should not happen)'
|
||||
;;
|
||||
esac
|
||||
# install static deps
|
||||
for pkg in zlib gettext libpng SDL2 wxWidgets; do
|
||||
for pkg in zlib gettext libpng SDL2 wxWidgets3; do
|
||||
set -- "$@" "${target}-${pkg}-static"
|
||||
done
|
||||
# install deps that are not available as static
|
||||
|
@ -770,7 +774,7 @@ suse_installdeps() {
|
|||
check_cross
|
||||
installing
|
||||
|
||||
tools="make cmake ccache nasm gettext-tools pkg-config ccache zip sfml2-devel"
|
||||
tools="make cmake ccache nasm gettext-tools pkg-config ccache zip sfml2-devel ninja"
|
||||
|
||||
libs="gcc gcc-c++ libpng16-devel libSDL2-devel wxWidgets-3_0-devel" # ffmpeg-devel
|
||||
|
||||
|
@ -824,7 +828,7 @@ archlinux_installdeps() {
|
|||
|
||||
# common needed dev packages
|
||||
# not using the base-devel group because it can break gcc-multilib
|
||||
check $pacman --noconfirm --needed -S binutils file grep gawk gzip libtool make patch sed util-linux nasm cmake ccache pkg-config git ccache zip
|
||||
check $pacman --noconfirm --needed -S binutils file grep gawk gzip libtool make patch sed util-linux nasm cmake ccache pkg-config git ccache zip ninja
|
||||
|
||||
gtk=gtk3
|
||||
|
||||
|
@ -950,7 +954,7 @@ solus_installdeps() {
|
|||
|
||||
check sudo eopkg -y update-repo
|
||||
check sudo eopkg -y install -c system.devel
|
||||
check sudo eopkg -y install git ccache
|
||||
check sudo eopkg -y install git ccache ninja
|
||||
|
||||
set -- sdl2-devel wxwidgets-devel libgtk-2-devel libgtk-3-devel
|
||||
|
||||
|
@ -1019,7 +1023,7 @@ gentoo_installdeps() {
|
|||
|
||||
check sudo emerge-webrsync
|
||||
|
||||
ebuilds="gcc make cmake ccache binutils libsdl2 libsfml wxGTK zlib dev-util/pkgconfig nasm"
|
||||
ebuilds="gcc make cmake ccache binutils libsdl2 libsfml wxGTK zlib dev-util/pkgconfig nasm dev-util/ninja"
|
||||
|
||||
[ -n "$ENABLE_OPENAL" ] && ebuilds="$ebuilds media-libs/openal"
|
||||
|
||||
|
@ -1039,7 +1043,7 @@ windows_installdeps() {
|
|||
# update catalogs
|
||||
check pacman -Sy
|
||||
|
||||
pkgs="SDL2 sfml wxWidgets zlib binutils cmake crt-git extra-cmake-modules gcc gcc-libs gcc-libgfortran gdb headers-git make pkg-config tools-git windows-default-manifest libmangle-git nasm"
|
||||
pkgs="SDL2 sfml wxWidgets zlib binutils cmake crt-git extra-cmake-modules gcc gcc-libs gcc-libgfortran gdb headers-git make pkg-config tools-git windows-default-manifest libmangle-git nasm ninja"
|
||||
|
||||
[ -n "$ENABLE_OPENAL" ] && pkgs="$pkgs openal"
|
||||
[ -n "$ENABLE_FFMPEG" ] && pkgs="$pkgs ffmpeg"
|
||||
|
@ -1098,7 +1102,7 @@ brew_installdeps() {
|
|||
|
||||
check brew -v update
|
||||
|
||||
brews="nasm cmake ccache gettext libpng pkg-config sdl2 wxmac ccache"
|
||||
brews="nasm cmake ccache gettext libpng pkg-config sdl2 wxmac ccache ninja"
|
||||
|
||||
[ -n "$ENABLE_FFMPEG" ] && brews="$brews ffmpeg"
|
||||
|
||||
|
@ -1128,7 +1132,7 @@ macports_installdeps() {
|
|||
|
||||
check sudo port -v selfupdate
|
||||
|
||||
ports="cmake ccache nasm gettext libpng pkgconfig libsdl2 sfml wxWidgets-3.0 libiconv"
|
||||
ports="cmake ccache nasm gettext libpng pkgconfig libsdl2 sfml wxWidgets-3.0 libiconv ninja"
|
||||
|
||||
[ -n "$ENABLE_FFMPEG" ] && ports="$ports ffmpeg"
|
||||
|
||||
|
@ -1144,7 +1148,7 @@ fink_installdeps() {
|
|||
|
||||
check sudo fink -vy selfupdate
|
||||
|
||||
pkgs="cmake ccache nasm libgettext8-dev gettext-tools libpng16 pkgconfig sdl2 wxwidgets300-osxcocoa libiconv-dev sfml24-dev ccache"
|
||||
pkgs="cmake ccache nasm libgettext8-dev gettext-tools libpng16 pkgconfig sdl2 wxwidgets300-osxcocoa libiconv-dev sfml24-dev ccache ninja"
|
||||
|
||||
[ -n "$ENABLE_FFMPEG" ] && pkgs="$pkgs ffmpeg"
|
||||
|
||||
|
@ -1160,8 +1164,8 @@ build_instructions() {
|
|||
|
||||
$pre_build
|
||||
mkdir -p build && cd build
|
||||
$CMAKE .. $cmake_flags
|
||||
make $(jobs_flag)
|
||||
$CMAKE .. $cmake_flags -G Ninja
|
||||
ninja
|
||||
$post_build
|
||||
|
||||
EOF
|
||||
|
|
|
@ -4,11 +4,16 @@ if(COMMAND cmake_policy)
|
|||
cmake_policy(SET CMP0003 NEW) # link to full path of libs
|
||||
cmake_policy(SET CMP0005 NEW) # escapes in add_definitions
|
||||
|
||||
|
||||
if(POLICY CMP0074)
|
||||
cmake_policy(SET CMP0074 NEW) # use Package_ROOT if set
|
||||
endif()
|
||||
|
||||
if(POLICY CMP0077)
|
||||
cmake_policy(SET CMP0077 NEW) # use vars for options
|
||||
endif()
|
||||
|
||||
if(NOT CMAKE_VERSION VERSION_LESS 3.0)
|
||||
if(POLICY CMP0043)
|
||||
cmake_policy(SET CMP0043 NEW) # for wxWidgets, use generator expressions
|
||||
endif()
|
||||
endif()
|
||||
|
|
Loading…
Reference in New Issue