wx3.0: add cmake support (2.8 by default)

use ./build.sh --wx30 for wx3.0
This commit is contained in:
Gregory Hainaut 2014-06-29 08:51:21 +02:00
parent 28227ea4c4
commit d09fee90ad
3 changed files with 6 additions and 1 deletions

View File

@ -33,6 +33,8 @@ do
--asan ) flags="$flags -DUSE_ASAN=TRUE";; --asan ) flags="$flags -DUSE_ASAN=TRUE";;
--clang ) use_clang=1; flags="$flags -DUSE_CLANG=TRUE" ;; --clang ) use_clang=1; flags="$flags -DUSE_CLANG=TRUE" ;;
--clean ) clean_build=1 ;; --clean ) clean_build=1 ;;
--wx28 ) flags="$flags -DWX28_API=TRUE" ;;
--wx30 ) flags="$flags -DWX28_API=FALSE" ;;
*) *)
# unknown option # unknown option
@ -46,6 +48,8 @@ do
echo "--extra : Build all plugins" echo "--extra : Build all plugins"
echo "--asan : Enable with Address sanitizer" echo "--asan : Enable with Address sanitizer"
echo "" echo ""
echo "--wx28 : Force wxWidget 2.8"
echo "--wx30 : Allow to use wxWidget 3.0"
echo "--glsl : Replace CG backend of ZZogl by GLSL" echo "--glsl : Replace CG backend of ZZogl by GLSL"
echo "--egl : Replace GLX by EGL (ZZogl plugins only)" echo "--egl : Replace GLX by EGL (ZZogl plugins only)"
echo "--sdl2 : Build with SDL2 (crash if wx is linked to SDL1)" echo "--sdl2 : Build with SDL2 (crash if wx is linked to SDL1)"

View File

@ -35,6 +35,7 @@ option(EXTRA_PLUGINS "Build various 'extra' plugins")
# FIXME do a proper detection # FIXME do a proper detection
set(SDL2_LIBRARY "-lSDL2") set(SDL2_LIBRARY "-lSDL2")
option(SDL2_API "Use SDL2 on spu2x and onepad") option(SDL2_API "Use SDL2 on spu2x and onepad")
option(WX28_API "Force wxWidget 2.8 lib. Default:ON" ON)
if(PACKAGE_MODE) if(PACKAGE_MODE)
if(NOT DEFINED PLUGIN_DIR) if(NOT DEFINED PLUGIN_DIR)

View File

@ -167,7 +167,7 @@ if(wxWidgets_FOUND)
### 2.8 ### 2.8
# -I/usr/lib/i386-linux-gnu/wx/include/gtk2-unicode-release-2.8 -I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -pthread # -I/usr/lib/i386-linux-gnu/wx/include/gtk2-unicode-release-2.8 -I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -pthread
# -L/usr/lib/i386-linux-gnu -pthread -Wl,-z,relro -L/usr/lib/i386-linux-gnu -lwx_gtk2u_richtext-2.8 -lwx_gtk2u_aui-2.8 -lwx_gtk2u_xrc-2.8 -lwx_gtk2u_qa-2.8 -lwx_gtk2u_html-2.8 -lwx_gtk2u_adv-2.8 -lwx_gtk2u_core-2.8 -lwx_baseu_xml-2.8 -lwx_baseu_net-2.8 -lwx_baseu-2.8 # -L/usr/lib/i386-linux-gnu -pthread -Wl,-z,relro -L/usr/lib/i386-linux-gnu -lwx_gtk2u_richtext-2.8 -lwx_gtk2u_aui-2.8 -lwx_gtk2u_xrc-2.8 -lwx_gtk2u_qa-2.8 -lwx_gtk2u_html-2.8 -lwx_gtk2u_adv-2.8 -lwx_gtk2u_core-2.8 -lwx_baseu_xml-2.8 -lwx_baseu_net-2.8 -lwx_baseu-2.8
if ("${wxWidgets_INCLUDE_DIRS}" MATCHES "3.0") if ("${wxWidgets_INCLUDE_DIRS}" MATCHES "3.0" AND WX28_API)
message(WARNING "\nWxwidget 3.0 is installed on your system whereas PCSX2 required 2.8 !!!\nPCSX2 will try to use 2.8 but if it would be better to fix your setup.\n") message(WARNING "\nWxwidget 3.0 is installed on your system whereas PCSX2 required 2.8 !!!\nPCSX2 will try to use 2.8 but if it would be better to fix your setup.\n")
STRING(REGEX REPLACE "unicode" "unicode-release" wxWidgets_INCLUDE_DIRS "${wxWidgets_INCLUDE_DIRS}") STRING(REGEX REPLACE "unicode" "unicode-release" wxWidgets_INCLUDE_DIRS "${wxWidgets_INCLUDE_DIRS}")
STRING(REGEX REPLACE "3\\.0" "2.8" wxWidgets_INCLUDE_DIRS "${wxWidgets_INCLUDE_DIRS}") STRING(REGEX REPLACE "3\\.0" "2.8" wxWidgets_INCLUDE_DIRS "${wxWidgets_INCLUDE_DIRS}")