Building Dolphin on Linux: Difference between revisions

m
→‎Step 3 - Building Dolphin: Update cmake compiler overrides
(→‎Ubuntu: Update Ubuntu build instructions)
m (→‎Step 3 - Building Dolphin: Update cmake compiler overrides)
Line 64: Line 64:
<code>cmake ..</code>
<code>cmake ..</code>


If you are using a different gcc version (4.9 on Ubuntu 14.04 for example), you'll need to overwrite some flags:
If you are using a different gcc version (7 on Ubuntu 16.04 for example), you'll need to overwrite some flags:


<code>CC=gcc-4.9 CXX=g++-4.9 cmake ..</code>
<code>cmake .. -DCMAKE_C_COMPILER=gcc-7 -DCMAKE_CXX_COMPILER=g++-7 </code>


You can compile with clang too:
You can compile with clang too:


<code>CC=clang CXX=clang++ CXXFLAGS+=-stdlib=libc++ LDFLAGS+=-lc++ cmake ..</code>
<code>cmake .. -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_CXX_FLAGS=-stdlib=libc++</code>


Note that you will have to add libc++-dev as dependence in this case. Clang minimum version is 3.4. Use SFML and pugixml from Externals/ (the latter is only necessary for {{revision|5.0-7026}} and later), otherwise you'll get some '''[https://hastebin.com/raw/etarucuged undefined references]'''.
Note that you will have to add libc++-dev and libc++abi-dev as dependence in this case. Clang minimum version is 3.4. Use SFML and pugixml from Externals/ (the latter is only necessary for {{revision|5.0-7026}} and later), otherwise you'll get some '''[https://hastebin.com/raw/etarucuged undefined references]'''.


Optionally you can change the install prefix by adding "-D CMAKE_INSTALL_PREFIX=/new/path". Note that this path does not need to be absolute. cmake will complete it to its absolute equivalent. The default prefix is "/usr". This means that the executable will be installed as "/usr/bin/dolphin-emu", the plugins will be installed into "/usr/lib/dolphin-emu", and the shared data files will be installed into "/usr/share/dolphin-emu".
Optionally you can change the install prefix by adding "-DCMAKE_INSTALL_PREFIX=/new/path". Note that this path does not need to be absolute. cmake will complete it to its absolute equivalent. The default prefix is "/usr". This means that the executable will be installed as "/usr/bin/dolphin-emu", the plugins will be installed into "/usr/lib/dolphin-emu", and the shared data files will be installed into "/usr/share/dolphin-emu".


From here build and install in the standard make way.
From here build and install in the standard make way.