mirror of https://github.com/PCSX2/pcsx2.git
Fix build in Fedora and print a confimation of cross compilation.
- Fedora only needs --arch if cross compiling. + It's only used to select libdir so i386=i686=i986 - Messages are nice to debug build logs. . Everything seems to work unless some other distro broke. Other distros need to add CMAKE_TOOLCHAIN_FILE or --cross-multilib if they cross compiled amd64 -> i686.
This commit is contained in:
parent
b03ca5fcf4
commit
553536f9cb
|
@ -68,12 +68,19 @@ option(USE_ASAN "Enable address sanitizer")
|
|||
#-------------------------------------------------------------------------------
|
||||
option(DISABLE_ADVANCE_SIMD "Disable advance use of SIMD (SSE2+ & AVX)" OFF)
|
||||
|
||||
# Print if we are cross compiling.
|
||||
if(CMAKE_CROSSCOMPILING)
|
||||
message(STATUS "Cross compilation is enabled.")
|
||||
else()
|
||||
message(STATUS "Cross compilation is disabled.")
|
||||
endif()
|
||||
|
||||
# Architecture bitness detection
|
||||
include(TargetArch)
|
||||
target_architecture(PCSX2_TARGET_ARCHITECTURES)
|
||||
if(${PCSX2_TARGET_ARCHITECTURES} MATCHES "x86_64" OR ${PCSX2_TARGET_ARCHITECTURES} MATCHES "i386")
|
||||
if(${PCSX2_TARGET_ARCHITECTURES} MATCHES "x86_64" AND (CMAKE_BUILD_TYPE MATCHES "Release" OR PACKAGE_MODE))
|
||||
message(FATAL_ERROR "The ${PCSX2_TARGET_ARCHITECTURES} architecture is not ready yet.")
|
||||
message(FATAL_ERROR "The code for ${PCSX2_TARGET_ARCHITECTURES} support is not ready yet.")
|
||||
endif()
|
||||
message(STATUS "Compiling a ${PCSX2_TARGET_ARCHITECTURES} build on a ${CMAKE_HOST_SYSTEM_PROCESSOR} host.")
|
||||
else()
|
||||
|
|
|
@ -15,8 +15,10 @@ find_package(OpenGL)
|
|||
# set(wxWidgets_CONFIG_OPTIONS --unicode=yes --debug=yes) # In case someone want to debug inside wx
|
||||
#
|
||||
# Fedora uses an extra non-standard option ... Arch must be the first option.
|
||||
if(Fedora)
|
||||
set(wxWidgets_CONFIG_OPTIONS --arch i686 --unicode=yes)
|
||||
# They do uname -m if missing so only fix for cross compilations.
|
||||
# http://pkgs.fedoraproject.org/cgit/wxGTK.git/plain/wx-config
|
||||
if(Fedora AND CMAKE_CROSSCOMPILING)
|
||||
set(wxWidgets_CONFIG_OPTIONS --arch ${PCSX2_TARGET_ARCHITECTURES} --unicode=yes)
|
||||
else()
|
||||
set(wxWidgets_CONFIG_OPTIONS --unicode=yes)
|
||||
endif()
|
||||
|
|
Loading…
Reference in New Issue