Building Citra in MacOS

Platform: MacBook Pro
Version: 10.12.3
Cpu: Core i7 2.2
Xcode: 8.2.1

1. Based on github release, install all component by brew:

https://github.com/citra-emu/citra/wiki/Building-for-macOS

2.Have alarm after cmake:

MacOS:Documents frank$ cd citra/
MacOS:citra frank$
MacOS:citra frank$
MacOS:citra frank$ export Qt5_DIR=$(brew --prefix)/opt/qt5
MacOS:citra frank$ export MACOSX_DEPLOYMENT_TARGET=10.9
MacOS:citra frank$ mkdir build
MacOS:citra frank$ cd build
MacOS:build frank$ cmake .. -GXcode
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
CMake Error at CMakeLists.txt:36 (project):
No CMAKE_C_COMPILER could be found.

CMake Error at CMakeLists.txt:36 (project):
No CMAKE_CXX_COMPILER could be found.

-- Configuring incomplete, errors occurred!
See also "/Users/frank/Documents/citra/build/CMakeFiles/CMakeOutput.log".
See also "/Users/frank/Documents/citra/build/CMakeFiles/CMakeError.log".

3. Check why by error:

MacOS:build frank$ more /Users/frank/Documents/citra/build/CMakeFiles/CMakeOutput.log
The system is: Darwin - 16.4.0 - x86_64
MacOS:build frank$ 
MacOS:build frank$ 
MacOS:build frank$ 
MacOS:build frank$ more /Users/frank/Documents/citra/build/CMakeFiles/CMakeError.log
Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler:  
Build flags: 
Id flags: 

The output was:
1
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance


Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler:  
Build flags: 
Id flags: 

The output was:
1
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

4. Xcode not install, install Xcode 8.2.1, then do follow:

sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
sudo xcodebuild -license
sudo cmake .. -GXcode

5. Have qt5 issue after do cmake again

MacOS:build frank$ sudo cmake .. -GXcode
-- Target architecture: x86_64
-- libpng not found. Some debugging features have been disabled.
-- Boost 1.57.0 or newer not found, falling back to externals


CMake Error at CMakeLists.txt:228 (find_package):
  By not providing "FindQt5.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "Qt5", but
  CMake did not find one.

  Could not find a package configuration file provided by "Qt5" with any of
  the following names:

    Qt5Config.cmake
    qt5-config.cmake

  Add the installation prefix of "Qt5" to CMAKE_PREFIX_PATH or set "Qt5_DIR"
  to a directory containing one of the above files.  If "Qt5" provides a
  separate development package or SDK, be sure it has been installed.


-- Configuring incomplete, errors occurred!
See also "/Users/frank/Documents/citra/build/CMakeFiles/CMakeOutput.log".
See also "/Users/frank/Documents/citra/build/CMakeFiles/CMakeError.log".

6. Cmake by special CMAKE_PREFIX_PATH, as follow:

MacOS:build frank$ sudo cmake .. -GXcode -DCMAKE_PREFIX_PATH=/usr/local/Cellar/qt5/5.8.0_1/
Password:
-- Target architecture: x86_64
-- libpng not found. Some debugging features have been disabled.
-- Boost 1.57.0 or newer not found, falling back to externals


-- Target architecture: x86_64
-- Boost version: 1.59.0
-- CMake version: 3.7.2
-- Version: 3.0.2
-- Build type: 
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/frank/Documents/citra/build

7. Success Building Citra:

sudo xcodebuild -config Release -project citra.xcodeproj -target citra-qt
....
Touch build/src/citra_qt/Release/citra-qt.app
    cd /Users/frank/Documents/citra
    /usr/bin/touch -c /Users/frank/Documents/citra/build/src/citra_qt/Release/citra-qt.app

RegisterWithLaunchServices build/src/citra_qt/Release/citra-qt.app
    cd /Users/frank/Documents/citra
    builtin-lsRegisterURL /Users/frank/Documents/citra/build/src/citra_qt/Release/citra-qt.app

** BUILD SUCCEEDED **

8. Test 3Ds Game

Simulator not very good, couldn’t control and play…

本文出自 Frank's Blog

版权声明:


本文链接:Building Citra in MacOS
版权声明:本文为原创文章,仅代表个人观点,版权归 Frank Zhao 所有,转载时请注明本文出处及文章链接
你可以留言,或者trackback 从你的网站

留言哦

blonde teen swallows load.xxx videos