Commit graph

334 commits

Author SHA1 Message Date
Ameer J a086ee6a00
Merge pull request #6565 from lat9nq/bundle-ffmpeg
cmake, ci: Build bundled FFmpeg with yuzu
2021-08-01 01:34:10 -04:00
Ameer J d923ec5805
Merge pull request #6753 from jbeich/libusb
cmake: unbreak libusb detection on FreeBSD
2021-07-27 21:26:17 -04:00
Jan Beich a24224e274 cmake: don't use pkg-config directly with non-reference libusb
CMake Error at externals/libusb/CMakeLists.txt:120 (add_library):
  Cannot find source file:

    libusb/libusb/core.c

  Tried extensions .c .C .c++ .cc .cpp .cxx .cu .mpp .m .M .mm .h .hh .h++
  .hm .hpp .hxx .in .txx .f .F .for .f77 .f90 .f95 .f03 .ispc

CMake Error at externals/libusb/CMakeLists.txt:120 (add_library):
  No SOURCES given to target: usb

ld: error: undefined symbol: libusb_interrupt_transfer
>>> referenced by gc_adapter.cpp
>>>               gc_adapter.cpp.o:(GCAdapter::Adapter::SendVibrations()) in archive src/input_common/libinput_common.a
>>> referenced by gc_adapter.cpp
>>>               gc_adapter.cpp.o:(GCAdapter::Adapter::GetGCEndpoint(libusb_device*)) in archive src/input_common/libinput_common.a
>>> referenced by gc_adapter.cpp
>>>               gc_adapter.cpp.o:(GCAdapter::Adapter::AdapterInputThread()) in archive src/input_common/libinput_common.a

ld: error: undefined symbol: libusb_error_name
>>> referenced by gc_adapter.cpp
>>>               gc_adapter.cpp.o:(GCAdapter::Adapter::SendVibrations()) in archive src/input_common/libinput_common.a

ld: error: undefined symbol: libusb_control_transfer
>>> referenced by gc_adapter.cpp
>>>               gc_adapter.cpp.o:(GCAdapter::Adapter::CheckDeviceAccess()) in archive src/input_common/libinput_common.a

ld: error: undefined symbol: libusb_kernel_driver_active
>>> referenced by gc_adapter.cpp
>>>               gc_adapter.cpp.o:(GCAdapter::Adapter::CheckDeviceAccess()) in archive src/input_common/libinput_common.a

ld: error: undefined symbol: libusb_close
>>> referenced by gc_adapter.cpp
>>>               gc_adapter.cpp.o:(GCAdapter::Adapter::CheckDeviceAccess()) in archive src/input_common/libinput_common.a
>>> referenced by gc_adapter.cpp
>>>               gc_adapter.cpp.o:(GCAdapter::Adapter::ClearLibusbHandle()) in archive src/input_common/libinput_common.a
>>> referenced by gc_adapter.cpp
>>>               gc_adapter.cpp.o:(GCAdapter::Adapter::Reset()) in archive src/input_common/libinput_common.a
>>> referenced by gc_adapter.cpp
>>>               gc_adapter.cpp.o:(GCAdapter::Adapter::Setup()) in archive src/input_common/libinput_common.a
>>> referenced by gc_adapter.cpp
>>>               gc_adapter.cpp.o:(GCAdapter::Adapter::AdapterScanThread()) in archive src/input_common/libinput_common.a

ld: error: undefined symbol: libusb_detach_kernel_driver
>>> referenced by gc_adapter.cpp
>>>               gc_adapter.cpp.o:(GCAdapter::Adapter::CheckDeviceAccess()) in archive src/input_common/libinput_common.a

ld: error: undefined symbol: libusb_claim_interface
>>> referenced by gc_adapter.cpp
>>>               gc_adapter.cpp.o:(GCAdapter::Adapter::CheckDeviceAccess()) in archive src/input_common/libinput_common.a

ld: error: undefined symbol: libusb_get_config_descriptor
>>> referenced by gc_adapter.cpp
>>>               gc_adapter.cpp.o:(GCAdapter::Adapter::GetGCEndpoint(libusb_device*)) in archive src/input_common/libinput_common.a

ld: error: undefined symbol: libusb_release_interface
>>> referenced by gc_adapter.cpp
>>>               gc_adapter.cpp.o:(GCAdapter::Adapter::ClearLibusbHandle()) in archive src/input_common/libinput_common.a
>>> referenced by gc_adapter.cpp
>>>               gc_adapter.cpp.o:(GCAdapter::Adapter::Reset()) in archive src/input_common/libinput_common.a
>>> referenced by gc_adapter.cpp
>>>               gc_adapter.cpp.o:(GCAdapter::Adapter::Setup()) in archive src/input_common/libinput_common.a
>>> referenced by gc_adapter.cpp
>>>               gc_adapter.cpp.o:(GCAdapter::Adapter::AdapterScanThread()) in archive src/input_common/libinput_common.a

ld: error: undefined symbol: libusb_init
>>> referenced by gc_adapter.cpp
>>>               gc_adapter.cpp.o:(GCAdapter::Adapter::Adapter()) in archive src/input_common/libinput_common.a

ld: error: undefined symbol: libusb_open_device_with_vid_pid
>>> referenced by gc_adapter.cpp
>>>               gc_adapter.cpp.o:(GCAdapter::Adapter::Setup()) in archive src/input_common/libinput_common.a

ld: error: undefined symbol: libusb_get_device
>>> referenced by gc_adapter.cpp
>>>               gc_adapter.cpp.o:(GCAdapter::Adapter::Setup()) in archive src/input_common/libinput_common.a

ld: error: undefined symbol: libusb_exit
>>> referenced by gc_adapter.cpp
>>>               gc_adapter.cpp.o:(GCAdapter::Adapter::Reset()) in archive src/input_common/libinput_common.a
2021-07-27 15:01:56 +00:00
bunnei ffc78ce9c1
Merge pull request #6652 from lat9nq/cmd-vulkan-fixes
yuzu-cmd: Linux Vulkan fixes
2021-07-19 20:54:03 -04:00
lat9nq d3748cad73 emu_window_sdl2_vk: Use the generated SDL config
On Linux, due to the way we include SDL2 as a submodule, it makes it
difficult for us to specify which SDL_config.h we intended to include.
Before, CMake would default to the dummy one included with SDL and
ignore the generated one.

This tells CMake to use the generated one. In addition, we define
USING_GENERATED_CONFIG_H to throw an error in case the dummy config is
used by accident. Fixes Vulkan not working on Linux yuzu-cmd.
2021-07-16 15:43:02 -04:00
lat9nq 4c6cc67520 cmake: Only search for Qt when we need to
When YUZU_USE_BUNDLED_QT was specified on a system with a compliant Qt
version installed, CMake configuration would cause an error due to
mixing YUZU_USE_BUNDLED_QT with the system Qt.

Solution is to only search for Qt when YUZU_USE_BUNDLED_QT is disabled.
2021-07-16 02:26:34 -04:00
lat9nq a36d2b942b cmake: Only use NO_CMAKE_SYSTEM_PATH when needed for Qt
As-is causes issues with building yuzu using MinGW GCC on Linux-based
machines. Only set the variable when needed. (I'm not quite sure how
this was working before.)
2021-07-16 02:26:28 -04:00
ReinUsesLisp 849c6db335 cmake: Only copy pre-commit hook if .git directory exists
Allow the usage of git worktrees on yuzu.
2021-07-08 22:27:14 -03:00
lat9nq ef70054367 cmake: Specify the compiler on autotools externals
Enables CCache on externals if available.
2021-07-06 12:54:24 -04:00
lat9nq fbb26e6173 cmake, ci: Build bundled FFmpeg with yuzu
Drops usage of CMAKE_DEPENDENT_OPTION to allow using
YUZU_USE_BUNDLED_FFMPEG as an option on any platform. CI then now builds
FFmpeg always, netting about 10 MB less used on the AppImage.

Also somewhat fixes YUZU_USE_BUNDLED_QT so that it can be used even if
CMake doesn't clean up its state after running the first find_package.
2021-07-06 12:28:22 -04:00
Ameer J bab400daaf
Merge pull request #6459 from lat9nq/ubuntu-fixes
cmake: Improve Linux dependency checking for externals
2021-06-30 21:47:57 -04:00
Lioncash 8593e6f1e6 externals: Update fmt to 8.0.0
Keeps us up to date with the latest major release.

Also allows compilers that support it to perform compile-time format
string checking.
2021-06-23 02:43:36 -04:00
lat9nq 2bb0cc8624 cmake: Check dependencies for Linux Qt package
Currently Qt will download whether or not the target system supports the
package. Normally this isn't an issue since the package manager would
work out the dependencies for us, but in this case we must make sure
everything is in place before downloading the package.

This checks for the package's requirements, as well as tries to provides
hints as to what is required on some of the more cryptic dependencies.
2021-06-13 03:13:10 -04:00
lat9nq 932c0184a7 cmake: Fix find_program usage for 3.15
yuzu requires CMake 3.15 yet find_program was using REQUIRED, which is
only available on 3.18 and later. Instead, we check for
"<VAR>-NOTFOUND".

In addition, check for additional requirements before building libusb or
FFmpeg with autotools. Otherwise, CMake configuration will pass yet
compilation will fail.
2021-06-13 01:15:54 -04:00
lat9nq 890acfa2c0 externals: libusb: Link libusb statically on Linux
Turns out that this is possible. Also addresses my own review comment.
2021-06-03 04:38:29 -04:00
lat9nq ddc47e6df8 cmake: General improvements to libusb linking
Delegates libusb external communication to externals/CMakeLists.txt
Ensures an interface library `usb` for every pathway
input_common just links to the `usb` library now
externals/libusb/CMakeLists.txt sets variables to override SDL2's libusb
finding
Other minor cleanup
2021-06-03 03:49:35 -04:00
lat9nq 55dd027115 cmake: Use autotools to build libusb generally for GNU
Building libusb was also broken on GCC (and maybe Clang) on our
CMakeLists after upgrading to 1.0.24, but it was not being checked
because our 18.04 container had libusb installed on it.
This builds on the MinGW work from earlier and extends it to the rest of
the GNU toolchains. In addition we make use of pkg-config when present
to find libusb. pkg-config is preferrable because we can specify a
minimum required version.
2021-06-03 02:49:53 -04:00
lat9nq 1914a1d21c externals: libusb: Use autotools for MinGW
After updating to 1.0.24, MinGW fails to build libusb as a result of
numerous errors. So we build libusb their way and let them update the
nontrivial stuff.

This only applies to MinGW: the old path is still in use for Linux
toolchains as well as MSVC.

This will dynamically link libusb, since I hit build errors with the old
way we used to resolve the conflict with SDL2.
2021-05-31 13:57:06 -04:00
lat9nq f94cb0bdb2 cmake: Fix usage of CMAKE_DEPENDENT_OPTION
CMAKE_DEPENDENT_OPTION takes a value argument, but as a macro function
it will read a variable name as the name and not the value. For
YUZU_USE_BUNDLED_QT, ensure that we are reading the value of MSVC. For
YUZU_ALLOW_SYSTEM_SDL2, CMAKE_DEPENDENT_OPTION is redundant here anyway
as we don't use that path on any toolchain by default.
2021-05-27 12:51:52 -04:00
lat9nq 52cc25ccbf cmake: Download Qt binaries on Linux if needed
If the local version of Qt is older than the minimum version required by
yuzu, download a pre-built binary package from yuzu-emu/ext-linux-bin
and build yuzu with it, instead.

This also requires linking yuzu to the correct libraries after building
it, and copying over the required binaries when building yuzu.

This sets the Qt requirement to 5.12, which is intentionally behind the
versions used by our toolchains since they are not all updated yet to
5.15.
2021-05-26 15:29:45 -04:00
Lioncash 922d5187c4 CMakeLists: Update zstd to 1.5.0
zstd 1.5.0 brings numerous performance improvements to the library, as
can be seen here: https://github.com/facebook/zstd/releases/tag/v1.5.0
2021-05-21 13:24:11 -04:00
v1993 648bef235e
On Linux, build SDL2 from externals with HIDAPI support 2021-05-09 18:12:58 +03:00
lat9nq 751cc687bb externals: Update SDL to 107db2d8
In light of 72a49c2bbc, the SDL submodule also needs updated. Updates
to the same commit used by the SDL package in ext-windows-bin.
2021-05-09 01:36:17 -04:00
bunnei 72a49c2bbc
Update SDL2 to SDL2-2.0.15-prerelease.
- Improves native Switch JoyCon/Pro Controller support.
2021-05-08 01:51:24 -07:00
lat9nq 697a2c0018 cmake: Only config Boost during find_package
Without the CONFIG option, find_package will perform Module search. On
at least Linux Mint 20 (I'm unable to reproduce this on CentOS and Arch
Linux), my guess is that this causes CMake to find "dirty" modules that
modify the configuration state despite the Boost version being too
low/absent.

Use CONFIG to put CMake into pure Config mode and avoid Module search.
2021-04-25 21:02:39 -04:00
lat9nq ad55faaa35 cmake: Download Boost if inadequate local version
Building SDL2 from externals is incompatible with Conan's version of
libiconv, a requirement of Conan's Boost package. Solution is to use the
same Boost package in use by the linux-fresh container. This tells CMake
to download boost_1_75_0.tar.xz from yuzu-emu/ext-linux-bin at CMake's
configuration step, much the same way Qt and FFmpeg are downloaded for
Windows.

Also makes DownloadExternals.cmake cross-platform. Although the CMake
code is not entirely specific to Linux, only Linux has Boost libraries
available at ext-linux-bin, whereas there is no equivalent Boost package
for Windows at ext-windows-bin. caveat emptor
2021-04-22 14:09:40 -04:00
lat9nq 956b2bd332 cmake: Suppress SDL2 not found warning
If SDL2 is not found, the error is handled by falling back to externals.
No need spill the full warning at the find_package if it's going to be
handled later, so add QUIET to it.
2021-04-21 03:00:41 -04:00
lat9nq ea78f9a2ef cmake: Allow FFmpeg external usage and cleanup
Sets find_package(FFmpeg) to QUIET instead of REQUIRED. This allows
using the FFmpeg external in cases where there is no suitable installed
version of FFmpeg.

Also fixes a bug where multiple CMake configures causes FFmpeg_LIBRARIES
to concatenate on itself, producing cyclical dependencies. Unsets the
variable before building it in the foreach loop.

Fixes FFmpeg_INCLUDE_DIR not including the headers generated at run
time.
2021-04-21 02:57:22 -04:00
lat9nq de69a5266f cmake: Use SDL 2.0.14 and fix CMake scope issue
Forces using SDL 2.0.14. Upgrades the SDL external to that version. Adds
a message when switching to the external.

Fixes an error where input_common only links to SDL when SDL2_FOUND is
set, but externals/CMakeLists cannot set that variable to the required
scope. Switch to using ENABLE_SDL2, which we can use since we now
include the SDL source.
2021-04-17 23:42:57 -04:00
lat9nq 12e58917c0 externals: Add SDL 2.0.12
Since Bintray is (soon to be) no more, there needs to be a way to
acquire SDL2. Since 20.04's version is older than our minimum required
version (2.0.12), add it as an external.
2021-04-16 19:12:47 -04:00
bunnei 71d4abcfd4 cmake: Remove use of bintray for externals.
- Bintray will be deprecated on May 1st 2021 (https://bintray.com/)
- We were previously using this for Qt (non-Windows) and SDL.
- I've moved to bundled SDL on Windows.
2021-04-15 23:12:23 -07:00
Markus Wick 5096ed5e0a externals: Search for shared opus installation.
We had used conan for opus before, but there was a bug in the AVX detection.
However we still had the Findopus.cmake file within the repository, but not used.

This patch reenables the Findopus helper and prefer the system wide installation of opus.
2021-04-08 23:49:32 +02:00
lat9nq c44ab0f8f6 cmake: Update FFmpeg to 4.3.1
Download FFmpeg package version 4.3.1. Uses a file defined within the
package to determine with DLLs to copy.

Also corrects a submodule name.
2021-02-09 22:17:22 -05:00
ameerj d6ebb5c171 cmake: Revert FFmpeg 4.3.1 update for Windows builds
The new 4.3.1 externals build seems to not be compatible with yuzu. This also fixes an oversight when renaming CMake variables.
2021-02-08 23:11:59 -05:00
lat9nq 527188391c CMakeLists: Use bundled FFmpeg as a fallback
Sets YUZU_USE_BUNDLED_FFMPEG as a CMake dependent option that is OFF on
Linux and ON for WIN32 targets. If FFmpeg is not found when
YUZU_USE_BUNDLED_FFMPEG is OFF, the bundled module/binaries are used
instead.

Reverts earlier changes to FindFFmpeg a bit, mostly to keep parity with
it's Citra version a bit. Now _FFmpeg_ALL_COMPONENTS lists all
components. We overwrite FFmpeg_LIBRARIES and FFmpeg_INCLUDE_DIR after
using the module.
2021-02-06 03:17:36 -05:00
lat9nq 8b54e219c9 CMakeLists: Update to FFmpeg 4.3.1 for WIN32
Minimal binaries go brrrrrrr
2021-02-05 22:27:37 -05:00
lat9nq 830612ef9e CMakeLists: Fixes for linux-fresh
Tells CMake to look for either nasm or yasm as it is required to build
FFmpeg. Avoids a compile-time error by checking for it during
configuration.

Adds a workaround for Ubuntu Bionic's old version of make not
communicating jobserver details properly.
2021-02-05 18:06:57 -05:00
lat9nq 1d19eac415 CMake: Port citra-emu/citra FindFFmpeg.cmake
Also renames related CMake variables to match both the Find*FFmpeg* and
variables defined within the file. Fixes odd errors produced by the old
FindFFmpeg.

Citra's FindFFmpeg is slightly modified here: adds Citra's copyright at
the beginning, renames FFmpeg_INCLUDES to FFmpeg_INCLUDE_DIR, disables a
few components in _FFmpeg_ALL_COMPONENTS, and adds the missing avutil
component to the comment above.
2021-02-05 15:39:19 -05:00
lat9nq 47401016bf CMake: Implement YUZU_USE_BUNDLED_FFMPEG
For Linux, instructs CMake to use the FFmpeg submodule in externals.
This is HEAVILY based on our usage of the late Unicorn.  Minimal change
to MSVC as it uses the yuzu-emu/ext-windows-bin. MinGW now targets the
same ext-windows-bin libraries as MSVC for FFmpeg. Adds FFMPEG_LIBRARIES
to WIN32 and simplifies video_core/CMakeLists.txt a bit.
2021-02-05 14:49:51 -05:00
Valeri 46dda01151
Bump conan SDL2 version to 2.0.14
Update conan package version used for building.

A couple of new joystick-related functions might pose interest to yuzu's input system. Some sort of LED management have been added, but it doesn't seem to support leds used for player number indication JoyCons/ProCons use.
2021-01-21 21:47:35 +03:00
lat9nq 78be397723 CMakeLists: Disable YUZU_ENABLE_BOXCAT if ENABLE_WEB_SERVICE is disabled
Boxcat is a web service but is still enabled if ENABLE_WEB_SERVICE is
disabled during the CMake stage, which causes compilation issues with
either missing headers or missing libraries.

This disables YUZU_ENABLE_BOXCAT regardless of the input if
ENABLE_WEB_SERVICE is disabled.
2021-01-07 17:28:15 -05:00
FearlessTobi c90268127b Update zstd to v1.4.8
Co-Authored-By: Vitor K <29167336+vitor-k@users.noreply.github.com>
2021-01-03 01:58:14 +01:00
ReinUsesLisp 1b9e08ab78 cmake: Always enable Vulkan
Removes the unnecesary burden of maintaining separate #ifdef paths and
allows us sharing generic Vulkan code across APIs.
2020-12-24 21:07:24 -03:00
lat9nq 9b023a56a3 cmake/conan: Conditionally add target Boost::context
Addresses an issue with the two competing versions of Conan's Boost
package that are currently floating around.

Adds the Boost::context target only if it's recognized by CMake as a
target.
2020-12-15 23:47:29 -05:00
lat9nq 292dd642ce cmake: Fix generating CMake configs and linking with Boost
Fixes regression by 761206cf81, causing
yuzu to not build on Linux with any version of Boost except a cached
1.73 Conan version from before about a day ago.

Moves the Boost requirement out of the `REQUIRED_LIBS` psuedo-2D-array
for Conan to instead be manually configured, using Conan as a fallback
solution if the system does not meet our requirements.

Requires any update from the linux-fresh container in order to build.

**DO NOT MERGE** until someone with the MSVC toolchain can verify this
works there, too.
2020-12-13 01:28:51 -05:00
comex 0e122c13ad CMakeLists,network: Create YUZU_UNIX macro to replace __unix__
__unix__ is not predefined on Apple platforms even though they are Unix.
2020-12-06 18:56:40 -05:00
Lioncash 0785796372 externals: Update fmt to 7.1.2
Updates to the latest bugfix release of fmt.
2020-11-08 03:44:07 -05:00
Lioncash fc6db97a09 core: Remove usage of unicorn
Unicorn long-since lost most of its use, due to dynarmic gaining support
for handling most instructions. At this point any further issues
encountered should be used to make dynarmic better.

This also allows us to remove our dependency on Python.
2020-11-03 20:22:05 -05:00
bunnei 7dcf4c0018
Merge pull request #4831 from lioncash/fmt
externals: Update fmt to 7.1.0
2020-10-29 14:44:07 -07:00
ameerj eb67a45ca8 video_core: NVDEC Implementation
This commit aims to implement the NVDEC (Nvidia Decoder) functionality, with video frame decoding being handled by the FFmpeg library.

The process begins with Ioctl commands being sent to the NVDEC and VIC (Video Image Composer) emulated devices. These allocate the necessary GPU buffers for the frame data, along with providing information on the incoming video data. A Submit command then signals the GPU to process and decode the frame data.

To decode the frame, the respective codec's header must be manually composed from the information provided by NVDEC, then sent with the raw frame data to the ffmpeg library.

Currently, H264 and VP9 are supported, with VP9 having some minor artifacting issues related mainly to the reference frame composition in its uncompressed header.

Async GPU is not properly implemented at the moment.

Co-Authored-By: David <25727384+ogniK5377@users.noreply.github.com>
2020-10-26 23:07:36 -04:00
Lioncash 1dd4132eb1 externals: Update fmt to 7.1.0
Keeps the used version of the library up to date.
2020-10-26 18:34:44 -04:00
Morph 09126f3a4a cmake: Update to Qt 5.12.8 2020-09-09 08:50:39 -04:00
Lioncash 1f9ac1541f CMakeLists: Update fmt to 7.0.3
Keeps the library up to date and fixes a few bugs
2020-08-14 09:17:23 -04:00
Lioncash 1c3490a8db General: Tidy up clang-format warnings 2020-08-08 20:08:44 -04:00
Lioncash 2e68282214 CMakeLists: Update boost to 1.73
Keeps the library up to date.
2020-07-27 22:10:01 -04:00
Lioncash 6bb77b06dc CMakeLists: Update catch to 2.13
Keeps the library up to date
2020-07-27 22:09:04 -04:00
Lioncash 5b785232de CMakeLists: Update zstd to 1.4.5
Keeps the library version up to date.
2020-07-27 22:07:34 -04:00
Lioncash d25265d63a CMakeFiles: Update json to 3.8.0
Keeps the tracked version of the library up to date.
2020-07-27 22:06:11 -04:00
FearlessTobi 347b50ad43 yuzu: Port translation support from Citra
Co-Authored-By: Weiyi Wang <wwylele@gmail.com>
2020-07-18 14:09:11 +02:00
LC edb2caaae5
Merge pull request #4280 from jbeich/system-libusb
cmake: pass libusb include directory
2020-07-13 22:21:07 -04:00
Lioncash 07632ad825 CMakeLists: Enable usage of C++20 on Linux
This also fixes building on Linux with C++20, so we can enable it across
the board for all OSes that we officially support.
2020-07-12 18:15:29 -04:00
Lioncash b971b82275 CMakeLists: Correct boost asio disabling define name
Previously the name of the define was missing the BOOST_ prefix.
2020-07-12 17:17:51 -04:00
Lioncash 539675b21a CMakeLists: Disable concepts in boost asio 2020-07-12 15:56:44 -04:00
LC ed89bcc767
Merge pull request #4290 from lioncash/latest
CMakeLists: Make use of /std:c++latest on MSVC
2020-07-12 12:25:10 -04:00
MerryMage 6744e7ea4a CMakeLists: Do not search for system libusb on macOS 2020-07-11 14:37:34 +01:00
Lioncash fb0fefc75c CMakeLists: Make use of /std:c++latest on MSVC
Provides the buildbot with one builder that is always tracking the
latest version of the C++ standard, allowing us to progressively rectify
our code and amend any differences between standards over time instead
of waiting for a complete standard change, potentially breaking a lot of
code all at once.
2020-07-11 04:45:40 -04:00
bunnei 995067538d
Merge pull request #4221 from jbeich/unused-qt-opengl
cmake: drop dependency on QtOpenGL
2020-07-10 15:18:04 -04:00
bunnei 01a1adfb0c
Merge pull request #4287 from lioncash/fmt7
CMakeLists: Update fmt to 7.0.1
2020-07-10 13:02:21 -04:00
Lioncash 798c1b457d CMakeLists: Update fmt to 7.0.1
Keeps the package up to date with the latest major release of fmt.

This version brings in quite a bit of improvements, such as code size
reduction, etc.
2020-07-10 04:51:03 -04:00
Lioncash d39b457566 CMakeLists: Use lower-case command names
Our convention uses lower-case command names, so this is just a
consistency change.
2020-07-10 01:18:40 -04:00
David Marcec 48aa076049 cmake: Fix libusb builds breaking 2020-07-10 14:02:44 +10:00
Jan Beich 48ff15602e cmake: pass libusb include directory as well
In file included from src/input_common/gcadapter/gc_adapter.cpp:8:
src/./input_common/gcadapter/gc_adapter.h:11:10: fatal error: 'libusb.h' file not found
 #include <libusb.h>
          ^~~~~~~~~~
2020-07-09 15:26:54 +00:00
Jan Beich 2af7e40ce6 cmake: unbreak system libusb support
Reference libusb doesn't support DragonFly and FreeBSD because those
ship a different libusb implementation (supports 0.1, 1.0, 2.0 API).

ld: error: undefined symbol: usbi_backend
>>> referenced by core.c
>>>               core.c.o:(usbi_alloc_device) in archive externals/libusb/libusb.a

ld: error: undefined symbol: usbi_backend
>>> referenced by core.c
>>>               core.c.o:(usbi_alloc_device) in archive externals/libusb/libusb.a

ld: error: undefined symbol: usbi_backend
>>> referenced by core.c
>>>               core.c.o:(libusb_has_capability) in archive externals/libusb/libusb.a

ld: error: undefined symbol: usbi_backend
>>> referenced by core.c
>>>               core.c.o:(libusb_has_capability) in archive externals/libusb/libusb.a

ld: error: undefined symbol: usbi_backend
>>> referenced by core.c
>>>               core.c.o:(libusb_has_capability) in archive externals/libusb/libusb.a

ld: error: undefined symbol: usbi_backend
>>> referenced by core.c
>>>               core.c.o:(usbi_connect_device) in archive externals/libusb/libusb.a

ld: error: undefined symbol: usbi_backend
>>> referenced by core.c
>>>               core.c.o:(usbi_disconnect_device) in archive externals/libusb/libusb.a

ld: error: undefined symbol: usbi_backend
>>> referenced by core.c
>>>               core.c.o:(libusb_get_device_list) in archive externals/libusb/libusb.a

ld: error: undefined symbol: usbi_backend
>>> referenced by core.c
>>>               core.c.o:(libusb_get_device_list) in archive externals/libusb/libusb.a

ld: error: undefined symbol: usbi_backend
>>> referenced by core.c
>>>               core.c.o:(libusb_unref_device) in archive externals/libusb/libusb.a

ld: error: undefined symbol: usbi_backend
>>> referenced by core.c
>>>               core.c.o:(libusb_unref_device) in archive externals/libusb/libusb.a

ld: error: undefined symbol: usbi_write
>>> referenced by core.c
>>>               core.c.o:(usbi_signal_event) in archive externals/libusb/libusb.a

ld: error: undefined symbol: usbi_read
>>> referenced by core.c
>>>               core.c.o:(usbi_clear_event) in archive externals/libusb/libusb.a

ld: error: undefined symbol: usbi_backend
>>> referenced by core.c
>>>               core.c.o:(libusb_wrap_sys_device) in archive externals/libusb/libusb.a

ld: error: undefined symbol: usbi_backend
>>> referenced by core.c
>>>               core.c.o:(libusb_wrap_sys_device) in archive externals/libusb/libusb.a

ld: error: undefined symbol: usbi_backend
>>> referenced by core.c
>>>               core.c.o:(libusb_wrap_sys_device) in archive externals/libusb/libusb.a

ld: error: undefined symbol: usbi_backend
>>> referenced by core.c
>>>               core.c.o:(libusb_open) in archive externals/libusb/libusb.a

ld: error: undefined symbol: usbi_backend
>>> referenced by core.c
>>>               core.c.o:(libusb_open) in archive externals/libusb/libusb.a

ld: error: undefined symbol: usbi_read
>>> referenced by core.c
>>>               core.c.o:(libusb_close) in archive externals/libusb/libusb.a

ld: error: undefined symbol: usbi_write
>>> referenced by core.c
>>>               core.c.o:(libusb_close) in archive externals/libusb/libusb.a

ld: error: too many errors emitted, stopping now (use -error-limit=0 to see all errors)
c++: error: linker command failed with exit code 1 (use -v to see invocation)
2020-07-07 10:13:18 +00:00
Ameer f829932ed1 Fix merge conflicts? 2020-07-04 00:59:40 -04:00
Jan Beich b1b1ed7597 cmake: stop linking against QGL after c6a0ab9792 2020-07-01 22:11:39 +00:00
David Marcec d5dfe34c49 externals: Track opus as submodule instead of using conan
Supersedes #4068 see for details.
2020-07-01 15:09:33 +10:00
Jan Beich dda90ce1c2 cmake: depend on WebEngine with system Qt
CMake Error at src/yuzu/CMakeLists.txt:7 (add_executable):
  Target "yuzu" links to target "Qt5::WebEngineCore" but the target was not
  found.  Perhaps a find_package() call is missing for an IMPORTED target, or
  an ALIAS target is missing?
2020-06-29 23:52:45 +00:00
Ameer 121af3646d Singleton GC Adapter class, remove globals, fix naming convention
Fix clang formatting

Manual fix for configure_input_player formatting

Add missing lib usb cmake command
2020-06-21 21:17:07 -04:00
bunnei 2a3d4cad63
externals: Revert to libressl, as build is broken with find_package(OpenSSL). (#4093)
* externals: Revert to libressl, as build is broken with find_package(OpenSLL).

* fixup! externals: Revert to libressl, as build is broken with find_package(OpenSLL).

* fixup! externals: Revert to libressl, as build is broken with find_package(OpenSLL).
2020-06-16 21:46:19 -04:00
bunnei 104b334e40
Update CMakeLists.txt 2020-05-31 18:35:36 -04:00
bunnei 0ac8848eae
Update CMakeLists.txt 2020-05-31 17:46:25 -04:00
Markus Wick e8baf07136 Mark the opus version check as broken. 2020-05-09 12:47:59 +02:00
James Rowe bc30a591ba
Replace externals with Conan (#3735)
* Remove git submodules that will be loaded through conan

* Move custom Find modules to their own folder

* Use conan for downloading missing external dependencies

* CI: Change the yuzu source folder user to the user that the containers run on

* Attempt to remove dirty mingw build hack

* Install conan on the msvc build

* Only set release build type when using not using multi config generator

* Re-add qt bundled to workaround an issue with conan qt not downloading prebuilt binaries

* Add workaround for submodules that use legacy CMAKE variables

* Re-add USE_BUNDLED_QT on the msvc build bot
2020-05-08 17:09:29 -04:00
Jan Beich 1a2df0a5f3 cmake: Silence -Werror=implicit-fallthrough in SDL2 headers
In file included from src/input_common/sdl/sdl_impl.cpp:16:
In file included from /usr/local/include/SDL2/SDL.h:32:
In file included from /usr/local/include/SDL2/SDL_main.h:25:
/usr/local/include/SDL2/SDL_stdinc.h:445:9: error: unannotated fall-through between switch labels [-Werror,-Wimplicit-fallthrough]
        case 3:         *_p++ = _val;   /* fallthrough */
        ^
/usr/local/include/SDL2/SDL_stdinc.h:445:9: note: insert '[[fallthrough]];' to silence this warning
        case 3:         *_p++ = _val;   /* fallthrough */
        ^
        [[fallthrough]];
/usr/local/include/SDL2/SDL_stdinc.h:445:9: note: insert 'break;' to avoid fall-through
        case 3:         *_p++ = _val;   /* fallthrough */
        ^
        break;
/usr/local/include/SDL2/SDL_stdinc.h:446:9: error: unannotated fall-through between switch labels [-Werror,-Wimplicit-fallthrough]
        case 2:         *_p++ = _val;   /* fallthrough */
        ^
/usr/local/include/SDL2/SDL_stdinc.h:446:9: note: insert '[[fallthrough]];' to silence this warning
        case 2:         *_p++ = _val;   /* fallthrough */
        ^
        [[fallthrough]];
/usr/local/include/SDL2/SDL_stdinc.h:446:9: note: insert 'break;' to avoid fall-through
        case 2:         *_p++ = _val;   /* fallthrough */
        ^
        break;
/usr/local/include/SDL2/SDL_stdinc.h:447:9: error: unannotated fall-through between switch labels [-Werror,-Wimplicit-fallthrough]
        case 1:         *_p++ = _val;   /* fallthrough */
        ^
/usr/local/include/SDL2/SDL_stdinc.h:447:9: note: insert '[[fallthrough]];' to silence this warning
        case 1:         *_p++ = _val;   /* fallthrough */
        ^
        [[fallthrough]];
/usr/local/include/SDL2/SDL_stdinc.h:447:9: note: insert 'break;' to avoid fall-through
        case 1:         *_p++ = _val;   /* fallthrough */
        ^
        break;
3 errors generated.
2020-04-18 23:26:22 +00:00
Brian Clinkenbeard 13b02a1414 fix CMake build errors for certain SDL2 installations 2020-02-17 13:01:40 -08:00
Brian Clinkenbeard 68043dd233 use config mode for finding SDL2 with CMake 2020-02-10 19:56:33 -08:00
fearlessTobi ac3690f205 Input: UDP Client to provide motion and touch controls
An implementation of the cemuhook motion/touch protocol, this adds the
ability for users to connect several different devices to citra to send
direct motion and touch data to citra.

Co-Authored-By: jroweboy <jroweboy@gmail.com>
2020-01-23 20:55:26 +01:00
Jake Merdich dc70a36b44 Ignore git-related files in cmake for EA tarballs
This fixes the early-access builds on Windows (tested on EA 58). Cmake
was previously looking for git-related files that were stripped out of
the early access builds and failing; check if those exist before reading
them.
2019-12-05 22:48:20 -05:00
Zach Hilman d8bcb1e973 cmake: Add cmake option to build Boxcat backend
Default enabled
2019-09-30 17:26:10 -04:00
Tobias cae9708a00 Revert "CMake: Get Git submodule dependencies via CMake (#2474)"
This reverts commit 5cef446f42.
2019-06-29 22:19:47 +02:00
Frederic L 5cef446f42 CMake: Get Git submodule dependencies via CMake (#2474)
* CMake: Get Git submodule dependencies via CMake

* CMakeLists: Fixed unintentional line break

* travis: Bring parity between linux-mingw and linux build script

* CMakeLists: Fixed typo in error message
2019-06-19 22:26:12 -04:00
Lioncash a6fb6ccc83 CMakeLists: Handle VS 2019 in a less annoying manner
VS 2019 is binary compatible with VS 2017, so we can safely use
the prebuilt libraries for VS 2017 with VS 2019. This makes it less
annoying to build yuzu with the most up to date toolchain.
2019-05-14 19:05:51 -04:00
khang06 945e39471d fix clang-format target when using a path with spaces on windows 2019-04-07 02:10:01 +02:00
bunnei f08db7295a
Merge pull request #2253 from lioncash/flags
Migrate off directly modifying CMAKE_* compilation-related flags directly
2019-03-23 13:46:53 -04:00
MerryMage 51f609fee7 CMakeLists: Raise minimum Boost requirement to 1.66.0
Required due to bugfix in boost for changed template resolving rules in GCC 7.3.0 in C++17 mode
2019-03-17 23:04:03 +00:00
Lioncash 13bc74e957 CMakeLists: Move compilation flags into the src directory
We generally shouldn't be hijacking CMAKE_CXX_FLAGS, etc as a means to
append flags to the targets, since this adds the compilation flags to
everything, including our externals, which can result in weird issues
and makes the build hierarchy fragile.

Instead, we want to just apply these compilation flags to our targets,
and let those managing external libraries to properly specify their
compilation flags.

This also results in us not getting as many warnings, as we don't raise
the warning level on every external target.
2019-03-17 01:49:09 -04:00
Lioncash e5b004e903 CMakeLists: Remove now-unnecessary GCC special-casing
This issue has since been fixed in newer versions of Boost, so we don't
need to worry about this anymore.
2019-03-15 20:49:58 -04:00
ReinUsesLisp cc94a6d101 cmake: Add Vulkan option 2019-02-12 18:33:02 -03:00
ReinUsesLisp be4641c43f gl_shader_disk_cache: Invalidate shader cache changes with CMake hash 2019-02-06 22:20:57 -03:00
Zach Hilman 15501477e7 Update Qt MSVC external to 5.12.0 2018-12-31 13:19:23 -05:00