support and default to wxgtk3 not gtk2 on arch

Change installdeps to install wxgtk3 on arch instead of the wxgtk
package which uses gtk2.

Update the cmake code to check for the renamed wx-config executable
wx-config-gtk3 on arch, first checking for wx-config-gtk4 for the
future.
This commit is contained in:
Rafael Kitover 2018-06-18 02:44:19 -07:00
parent 430b5d638d
commit 2efcb620bd
2 changed files with 17 additions and 3 deletions

View File

@ -545,7 +545,7 @@ archlinux_installdeps() {
# 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 pkg-config git
libs="zlib mesa gettext libpng sdl2 openal wxgtk gtk2 gtk3 sfml ffmpeg"
libs="zlib mesa gettext libpng sdl2 openal wxgtk3 gtk3 sfml ffmpeg"
if [ -z "$target" -o "$target" = m32 ]; then
if [ -z "$target" -o -z "$amd64" ]; then

View File

@ -72,12 +72,26 @@ endif()
SET(wxWidgets_USE_UNICODE ON)
# adv is for wxAboutBox
# xml, html is for xrc
SET(wxWidgets_USE_LIBS xrc xml html adv gl net core base gl)
# do not include gl at first
set(wxWidgets_USE_LIBS xrc xml html adv net core base gl)
#list(APPEND wxWidgets_CONFIG_OPTIONS --version=2.8)
# check for gtk4 then gtk3 packages first, some dists like arch rename the
# wx-config utility for these packages
set(wxWidgets_CONFIG_EXECUTABLE wx-config-gtk4)
find_package(wxWidgets QUIET)
if(NOT wxWidgets_FOUND)
set(wxWidgets_CONFIG_EXECUTABLE wx-config-gtk3)
find_package(wxWidgets QUIET)
if(NOT wxWidgets_FOUND)
unset(wxWidgets_CONFIG_EXECUTABLE)
endif()
endif()
# the gl lib may not be available, and if it looks like it is we still have to
# do a compile test later
FIND_PACKAGE(wxWidgets QUIET)
list(APPEND wxWidgets_USE_LIBS gl)
find_package(wxWidgets QUIET)
normalize_wx_paths()
SET(CHECK_WX_OPENGL FALSE)