To use it, with a modern LLVM (3.9+), set your CMAKE_PREFIX_PATH
to point to the LLVM install folder or to a LLVM build folder.
We're linking ALL of LLVM libs since I don't really know which ones we need.
LTO will take care of sliming the binary size...
Fixes an issue where Dolphin's revision information could be incorrect
when:
1) CMake was run while HEAD was at commit A
2) HEAD was set to commit B, which didn't have differences from A
that would cause CMake to be re-run
This does not fix the issue with incorrect information about whether
Dolphin was built from a dirty working tree or not.
The built-in `configure_file` command correctly handles the case where
none of the variables change and scmrev.h doesn't need to be rebuilt.
This saves a full re-link of Dolphin any time CMake is re-run.
On macOS, we want them copied in the bundle directly, otherwise we will
install them later in the system folder.
Obviously not working for Windows, but that's not any different from before!
This is similar to add_definitions, but supports generator expressions.
It also has an optional argument to add only to Debug or Release
configurations.
This is an issue because CMAKE_SYSTEM_PROCESSOR is defined as the host
processor when not cross-compiling, and building for Win32 doesn't count
as cross-compiling.
Compilers are very picky and don't use PCH when they have been compiled
with different flags. I even got some ICE in MSVC, so removing them for now.
Modules are the solution.
CMake would have trouble with some configuration tests on FreeBSD (and
presumably other BSDs) due to installed libraries being in /usr/local, but
not being in the default search path. Adding these to the default search path
fixes mbedtls and portaudio not being found, and possibly more.
In newer versions of CMake, the variable is ON by default.
This generates imports like @rpath/libusb.dylib which the
packaging script doesn’t understand.
We don’t really need @rpath, so we can just disable it
at the global scope instead of fixing the script.
They are already disabled when the libraries can’t be found, this only
helps people who want to build without them despite having them
installed, for example to provide a package to someone else.
Based on ca0c2efe7a. Credits go to flacs.
However, unlike the original commit, hidapi does not completely replace
the current implementations, so we can still connect Wiimotes with 1+2
(without pairing).
Also, it is only used on Linux and OS X for now. This removes the
advantage of having only one implementation but there is no other
choice: using hidapi on Windows is currently impossible because
hid_write() is implemented in a way that won't work with Wiimotes.
Additionally:
* We now check for the device name in addition to the PID/VID so we can
support the Balance Board and maybe third-party Wiimotes too. This
doesn't achieve anything with the DolphinBar but it does with hidraw.
* Added a check to not connect to the same device more than once.
Let's stop pretending that we support Triforce emulation.
Keeping this code around just in case someone will make
major improvements in the future isn't really worth it.
I'm keeping the Triforce game INIs so users will know that
the compatibility rating for Triforce games is 1 star (broken).
On a case-sensitive filesystem, the "foundation" library can not be
found, as the framework starts with a capital "F". Because the
Foundation framework is required by other parts of the build, this
causes the build to fail.
Should help with future builds, too, as the upcoming APFS is
case-sensitive.
Most modern Unix environments use 64-bit off_t by default: OpenBSD,
FreeBSD, OS X, and Linux libc implementations such as Musl.
glibc is the lone exception; it can default to 32 bits but this is
configurable by setting _FILE_OFFSET_BITS.
Avoiding the stat64()/fstat64() interfaces is desirable because they
are nonstandard and not implemented on many systems (including
OpenBSD and FreeBSD), and using 64 bits for stat()/fstat() is either
the default or trivial to set up.
From wxWidgets master 81570ae070b35c9d52de47b1f14897f3ff1a66c7.
include/wx/defs.h -- __w64 warning disable patch by comex brought forward.
include/wx/msw/window.h -- added GetContentScaleFactor() which was not implemented on Windows but is necessary for wxBitmap scaling on Mac OS X so it needs to work to avoid #ifdef-ing the code.
src/gtk/window.cpp -- Modified DoSetClientSize() to direct call wxWindowGTK::DoSetSize() instead of using public wxWindowBase::SetSize() which now prevents derived classes (like wxAuiToolbar) intercepting the call and breaking it. This matches Windows which does NOT need to call DoSetSize internally. End result is this fixes Dolphin's debug tools toolbars on Linux.
src/osx/window_osx.cpp -- Same fix as for GTK since it has the same issue.
src/msw/radiobox.cpp -- Hacked to fix display in HiDPI (was clipping off end of text).
Updated CMakeLists for Linux and Mac OS X. Small code changes to Dolphin to fix debug error boxes, deprecation warnings, and retain previous UI behavior on Windows.
OS X uses a case insensitive filesystem by default: when I try to build,
a system header does #include <assert.h>, which picks up
Source/Core/Common/Assert.h. This only happens because CMakeLists adds
'${PROJECT_BINARY_DIR}/Source/Core/Common' as an include directory: in
an out-of-tree build, that directory contains no other source files, but
in an in-tree build PROJECT_BINARY_DIR is just the source root.
This is only used for scmrev.h. Change the include directory to
'${PROJECT_BINARY_DIR}/Source/Core' and the include to
"Common/scmrev.h", which is more consistent with normal headers anyway.
Our x86_64 recompilers don't support PIE and fail amazingly if enabled.
Disable it so package maintainers(!) or other randoms don't accidently enable it when we don't support it.
This PR installs an SVG icon to use as the main icon for dolphin in Linux
desktop environments (through the .desktop file) and removes the currently used
XPM icon. I've also added a 48x48 PNG for any desktops which don't support SVG
icons.
This has been the recommended way to ship application icons since forever
according to the Icon Theme Spec:
https://www.freedesktop.org/wiki/Specifications/icon-theme-spec/
This is also a prerequisite for dolphin appearing in the GNOME Software Centre
which does not support XPM icons.
- Change the path of the Sys folder to the executable's location
- Add LINUX_LOCAL_DEV flag to use relocatable version on Linux
- Add CMake definition for relocatable build
Currently only works on unix, but can be extended to other systems. Can
also be extended to do wiimotes.
Searches the Pipes folder for readable named pipes and creates a dolphin
input device out of them. Send controller inputs to the game by writing
to the file. Commands are described in Pipes.h.
miniupnpc.h provides MINIUPNPC_API_VERSION since 1.7 and we require 1.7
or later, so there is no reason to have version detection code for older
versions.
Adds a cmake module to correctly discover OProfile and adjusts the
corresponding CMakeLists to make use of it. Additionally removes
linking against the bfd library when compiling with OProfile because
Dolphin does not use it.
Dolphin uses threads, but never actually pulled them it. Normally
some library we depend on would pull threads in, but there are
potential builds that forget to pull in threads.
Not deleted, because it's the only option for some other operating
systems such as FreeBSD or any other slightly exotic operating
system someone might try and run dolphin on.