Disable by default, to be used by distributions who care to try and
prefer system-wide libraries when available. It makes sense for us to
keep using vendored libs by default when possible to make it easier for
users to compile, but we should provide appropriate tools for distro to
figure out which dependencies they can share with the rest of the
system.
We must not provide the /Externals directory as global include directory.
Here, this yield a crash because of external minizip header and system library mismatch.
Soundtouch itself recormends to include it with <SoundTouch.h> and -I/usr/include/soundtouch, so this should fit better.
Minizip 1.x is the old broken version, while 2.x is the newer fork we
use. Many distros ship the old version which is causing stack smashing
in RedumpVerifier, so we'll only use the shared lib if it's the newer
version.
Removed conditional use of std::mutex instead of std::shared_mutex on MacOS.
Because MacOS < 10.12 did not support std::shared_mutex, a previous commit
naïvely substituted std::mutex, which does not have the same behavior.
Reverses PR #8273, which substitues std::mutex for std::shared_mutex on
macOS, and results in several bugs that seem to only affect MacOS
- https://bugs.dolphin-emu.org/issues/11919
- https://bugs.dolphin-emu.org/issues/11842
- https://bugs.dolphin-emu.org/issues/11845
This change eliminates conditional code for MacOS in the core configuration
layer code and enables the use of modern language features that are more
secure and thread-safe.
This allows the user to set this to LEGACY. This can be useful for
people under Linux using optirun/primusrun with "old" nvidia drivers
that don't support GLVND properly.
Allows us to migrate off of printf specifiers and have more type-safe
formatting facilities. It also allows for custom type support as well.
fmt is also on track to have part of it standardized within C++2a, so
this will also lessen the transitional work necessary later on by
allowing new code to use it.
This simply adds the library but doesn't do anything with it yet.
MemoryWatcher only works on Linux and affects emulation determinism due
to scheduling additional events, which causes NetPlay to desync.
Considering that this interface is a rather specialized use case, the
communication with it is kinda crappy *and* it's affecting emulation, I
think it's best to just axe it and come up with a better implementation
of the functionality.
The documentation for setting cache entries dicates that the type must
either be BOOL, FILEPATH, PATH, STRING, or INTERNAL (with those exact
casings). Also, given we properly case it in other places, this is just
consistent.
The general convention for CMake is to use lowercase for commands, and
given we also follow that convention through most CMake files, this just
makes it more consistent.
Thin archives contain pathnames pointing to the object files instead of
full copies of the object files. This significantly reduces the disk
usage when building Dolphin.
Size of *.a files: (gcc-8.1.0, Linux amd64)
- Before: 83,876 KB
- After: 1,876 KB
- Diff: -82,000 KB
The resulting binaries are the same as before.
A similar change was implemented in the Linux kernel v4.8:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=a5967db9af51a84f5e181600954714a9e4c69f1f
We have to decide if we want to link to
libGL.so -- legacy
libOpenGL.so -- GLVND
As we use xxxGetProcAddress, we don't care about feature
levels of the linked library, so we're very fine with the
new way.
Allows us to bring includes and relevant libraries into scope by explicitly declaring linkage against the target
as opposed to using a variable. Also removes the dumping of OProfile includes into the top-level directory.
We already use a custom CMakeLists file for xxhash, so we can just make it's headers
public as part of its target interface.
This way, only libraries that link in the xxhash target will see its headers, as opposed
to every target under the top-level directory.
Adjusts Common to use the ICONV_LIBRARIES variable directly and doesn't
append it to the LIBS variable.
After this, there's only one remaining usage where libraries are added
to the LIBS variable, after which it can be removed once the rest of
the targets are migrated off add_dolphin_library
The only place this library is needed (core) is already linked in the core target.
Also make the linkage private to create linkage failures if the dependency isn't
explicitly linked in elsewhere where it should be.
Reduces the dependency on the LIBS variable.
Makes our libraries explicitly link in which libraries they need.
This makes our dependencies explicit and removes the reliance on the
LIBS variable to contain the libraries that they need.
Both libusbhid (system library) and libhidapi (3rd party library)
provide a function called hid_init. Dolphin was being linked to both.
The WiimoteScannerHidapi constructor was calling hid_init without
arguments. libusbhid's hid_init expects one argument (a file path).
It was being called as if it was defined without arguments, which
resulted in a garbage path being passed in, and because of that,
the Qt GUI was failing to launch with the following error:
'dolphin-emu-qt2: @ : No such file or directory'
Use @Orphis's FindFFmpeg module from ppsspp:
2149d3db7f
From that commit:
> This new module should be able to handle both libraries in the regular
> paths and fallback to pkg-config.
> It is also able to find dynamic libraries, not just static libraries.
> It will generate imported targets with the name FFmpeg::<lib> that you
> can use in your scripts.
Stops CMake from saying "BlueZ NOT found, disabling bluetooth support"
on other OSes. Windows, macOS, and Android support Bluetooth using other
libraries. I'm not sure if non-Linux, non-Android Unices (like FreeBSD)
need another message?
This PR attempts to turn on `-fdiagnostics-color` by default when using
the CMake Ninja generator.
Ninja effectively turns off colored messages by not running subcommands
in a pseudo-terminal. The Ninja maintainers have decided that using
pseudo-terminals has more downsides than upsides, but have helpfully
taught Ninja itself how to parse and remove color codes if its parent
isn't a (pseudo-)terminal.
Colored messages make it easier to read warnings and error messages in a
large build log, and are pretty.
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.