mirror of https://github.com/PCSX2/pcsx2.git
Update the archlinux wx fix.
This fixes it for build.sh and when not using build.sh (packaging). . Also fix native 32bit build which should also be broken and attempt to predict the future and fix it for lib32-wx3.0. Worst case the filenames have to be fixed which is trivial. . When wx2.8 support is dropped then only the lib32-wx3.0 IF should remain. When crosscompilation support gets dropped then the first IF gets deleted unless we also dropped wx2.8 support then everything gets deleted.
This commit is contained in:
parent
5933db386a
commit
6e28a8e694
5
build.sh
5
build.sh
|
@ -20,7 +20,6 @@ flags=(-DCMAKE_BUILD_PO=FALSE)
|
||||||
|
|
||||||
cleanBuild=0
|
cleanBuild=0
|
||||||
useClang=0
|
useClang=0
|
||||||
Build64=0
|
|
||||||
|
|
||||||
for ARG in "$@"; do
|
for ARG in "$@"; do
|
||||||
case "$ARG" in
|
case "$ARG" in
|
||||||
|
@ -70,10 +69,6 @@ for ARG in "$@"; do
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
if [[ (-f /usr/bin/wx-config32-2.8 && -f /usr/bin/wxrc32-2.8) && "$Build64" -eq 0 ]]; then
|
|
||||||
#add flags for archlinux, wx 3 is not yet in main repositories, wx2.8 need to be used for now
|
|
||||||
flags+=(-DwxWidgets_CONFIG_EXECUTABLE='/usr/bin/wx-config32-2.8' -DwxWidgets_wxrc_EXECUTABLE='/usr/bin/wxrc32-2.8' -DWX28_API=TRUE)
|
|
||||||
fi
|
|
||||||
root=$PWD/$(dirname "$0")
|
root=$PWD/$(dirname "$0")
|
||||||
log=$root/install_log.txt
|
log=$root/install_log.txt
|
||||||
build=$root/build
|
build=$root/build
|
||||||
|
|
|
@ -22,6 +22,35 @@ if(Fedora AND CMAKE_CROSSCOMPILING)
|
||||||
else()
|
else()
|
||||||
set(wxWidgets_CONFIG_OPTIONS --unicode=yes)
|
set(wxWidgets_CONFIG_OPTIONS --unicode=yes)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# Temprorary help for Arch-based distros.
|
||||||
|
# They have wx2.8, lib32-wx2.8 and wx3.0 but no lib32-wx3.0.
|
||||||
|
# wx2.8 => /usr/bin/wx-config-2.8, /usr/bin/wxrc-2.8
|
||||||
|
# lib32-wx2.8 => /usr/bin/wx-config32-2.8, /usr/bin/wxrc32-2.8
|
||||||
|
# wx3.0 => /usr/bin/wx-config, /usr/bin/wxrc -> /usr/bin/wxrc-3.0
|
||||||
|
# I'm going to take a wild guess and predict this:
|
||||||
|
# lib32-wx3.0 => /usr/bin/wx-config32-3.0, /usr/bin/wxrc32-3.0
|
||||||
|
# FindwxWidgets only searches for wxrc and wx-config. Therefore only native
|
||||||
|
# wx3.0 works since everything else has non-standard naming.
|
||||||
|
if(CMAKE_CROSSCOMPILING)
|
||||||
|
# Prefer wx3.0 if available. May need to fix the filenames for lib32-wx3.0.
|
||||||
|
if(${PCSX2_TARGET_ARCHITECTURES} MATCHES "i386" AND EXISTS "/usr/bin/wx-config32-3.0" AND EXISTS "/usr/bin/wxrc32-3.0")
|
||||||
|
set(wxWidgets_CONFIG_EXECUTABLE "/usr/bin/wx-config32-3.0")
|
||||||
|
set(wxWidgets_wxrc_EXECUTABLE "/usr/bin/wxrc32-3.0")
|
||||||
|
elseif(${PCSX2_TARGET_ARCHITECTURES} MATCHES "i386" AND EXISTS "/usr/bin/wx-config32-2.8" AND EXISTS "/usr/bin/wxrc32-2.8")
|
||||||
|
set(WX28_API TRUE)
|
||||||
|
set(wxWidgets_CONFIG_EXECUTABLE "/usr/bin/wx-config32-2.8")
|
||||||
|
set(wxWidgets_wxrc_EXECUTABLE "/usr/bin/wxrc32-2.8")
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
# Prefer wx3.0 if available.
|
||||||
|
if(EXISTS "/usr/bin/wx-config-2.8" AND EXISTS "/usr/bin/wxrc-2.8" AND (NOT EXISTS "/usr/bin/wx-config" OR NOT EXISTS "/usr/bin/wxrc"))
|
||||||
|
set(WX28_API TRUE)
|
||||||
|
set(wxWidgets_CONFIG_EXECUTABLE "/usr/bin/wx-config-2.8")
|
||||||
|
set(wxWidgets_wxrc_EXECUTABLE "/usr/bin/wxrc-2.8")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
find_package(wxWidgets COMPONENTS base core adv)
|
find_package(wxWidgets COMPONENTS base core adv)
|
||||||
find_package(ZLIB)
|
find_package(ZLIB)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue