Rely on the user specifying WX28_API.

This commit is contained in:
Miguel A. Colón Vélez 2015-01-04 15:08:12 -05:00
parent 7c766e66ad
commit 305942c78b
1 changed files with 4 additions and 7 deletions

View File

@ -33,19 +33,16 @@ endif()
# FindwxWidgets only searches for wxrc and wx-config. Therefore only native # FindwxWidgets only searches for wxrc and wx-config. Therefore only native
# wx3.0 works since everything else has non-standard naming. # wx3.0 works since everything else has non-standard naming.
if(CMAKE_CROSSCOMPILING) if(CMAKE_CROSSCOMPILING)
# Prefer wx3.0 if available. May need to fix the filenames for lib32-wx3.0. # 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") if(NOT WX28_API AND ${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_CONFIG_EXECUTABLE "/usr/bin/wx-config32-3.0")
set(wxWidgets_wxrc_EXECUTABLE "/usr/bin/wxrc32-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") elseif(WX28_API AND ${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_CONFIG_EXECUTABLE "/usr/bin/wx-config32-2.8")
set(wxWidgets_wxrc_EXECUTABLE "/usr/bin/wxrc32-2.8") set(wxWidgets_wxrc_EXECUTABLE "/usr/bin/wxrc32-2.8")
endif() endif()
else() else()
# Prefer wx3.0 if available. if(WX28_API AND EXISTS "/usr/bin/wx-config-2.8" AND EXISTS "/usr/bin/wxrc-2.8")
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_CONFIG_EXECUTABLE "/usr/bin/wx-config-2.8")
set(wxWidgets_wxrc_EXECUTABLE "/usr/bin/wxrc-2.8") set(wxWidgets_wxrc_EXECUTABLE "/usr/bin/wxrc-2.8")
endif() endif()