Skip to content

Commit

Permalink
support and default to wxgtk3 not gtk2 on arch
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
rkitover committed Jun 18, 2018
1 parent 430b5d6 commit 2efcb62
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
2 changes: 1 addition & 1 deletion installdeps
Expand Up @@ -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
Expand Down
18 changes: 16 additions & 2 deletions src/wx/CMakeLists.txt
Expand Up @@ -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)
Expand Down

0 comments on commit 2efcb62

Please sign in to comment.