cmake: Use non standard arch parameter on Fedora's wxconfig. Close issue 1368

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5495 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
gregory.hainaut 2013-01-02 13:34:38 +00:00
parent d4280db1f0
commit 9421e105bd
2 changed files with 35 additions and 22 deletions

View File

@ -1,31 +1,38 @@
# additonal cmake macros and functions
#-------------------------------------------------------------------------------
# detectOperatingSystem
#-------------------------------------------------------------------------------
# This function detects on which OS cmake is run and set a flag to control the
# build process. Supported OS: Linux, MacOSX, Windows
#
# On linux, it also set a flag for specific distribution (ie Fedora)
#-------------------------------------------------------------------------------
function(detectOperatingSystem)
# nothing detected yet
set(Linux FALSE PARENT_SCOPE)
set(MacOSX FALSE PARENT_SCOPE)
set(Windows FALSE PARENT_SCOPE)
# check if we are on Linux
if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
set(Linux TRUE PARENT_SCOPE)
endif(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
# nothing detected yet
set(MacOSX FALSE PARENT_SCOPE)
set(Windows FALSE PARENT_SCOPE)
set(Linux FALSE PARENT_SCOPE)
set(Fedora FALSE PARENT_SCOPE)
# check if we are on MacOSX
if(APPLE)
set(MacOSX TRUE PARENT_SCOPE)
endif(APPLE)
# check if we are on Linux
if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
set(Linux TRUE PARENT_SCOPE)
# check if we are on Windows
if(${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
set(Windows TRUE PARENT_SCOPE)
endif(${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
if (EXISTS /etc/os-release)
# Read the file without CR character
file(STRINGS /etc/os-release OS_RELEASE)
if ("${OS_RELEASE}" MATCHES "^.*ID=fedora.*$")
set(Fedora TRUE PARENT_SCOPE)
endif()
endif()
endif(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
# check if we are on MacOSX
if(APPLE)
set(MacOSX TRUE PARENT_SCOPE)
endif(APPLE)
# check if we are on Windows
if(${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
set(Windows TRUE PARENT_SCOPE)
endif(${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
endfunction(detectOperatingSystem)
#-------------------------------------------------------------------------------

View File

@ -39,7 +39,13 @@ find_package(Subversion)
# Force the unicode build (the variable is only supported on cmake 2.8.3 and above)
# Warning do not put any double-quote for the argument...
# set(wxWidgets_CONFIG_OPTIONS --unicode=yes --debug=yes) # In case someone want to debug inside wx
set(wxWidgets_CONFIG_OPTIONS --unicode=yes)
#
# Fedora uses an extra non-standard option ...
if(Fedora)
set(wxWidgets_CONFIG_OPTIONS --unicode=yes --arch i686)
else()
set(wxWidgets_CONFIG_OPTIONS --unicode=yes)
endif()
find_package(wxWidgets COMPONENTS base core adv)
find_package(ZLIB)
if (EGL_API)