summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
AgeCommit message (Collapse)Author
2021-07-08cmake: Only copy pre-commit hook if .git directory existsReinUsesLisp
Allow the usage of git worktrees on yuzu.
2021-06-30Merge pull request #6459 from lat9nq/ubuntu-fixesAmeer J
cmake: Improve Linux dependency checking for externals
2021-06-23externals: Update fmt to 8.0.0Lioncash
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-13cmake: Check dependencies for Linux Qt packagelat9nq
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-13cmake: Fix find_program usage for 3.15lat9nq
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-03externals: libusb: Link libusb statically on Linuxlat9nq
Turns out that this is possible. Also addresses my own review comment.
2021-06-03cmake: General improvements to libusb linkinglat9nq
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-03cmake: Use autotools to build libusb generally for GNUlat9nq
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-05-31externals: libusb: Use autotools for MinGWlat9nq
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-27cmake: Fix usage of CMAKE_DEPENDENT_OPTIONlat9nq
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-26cmake: Download Qt binaries on Linux if neededlat9nq
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-21CMakeLists: Update zstd to 1.5.0Lioncash
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-09On Linux, build SDL2 from externals with HIDAPI supportv1993
2021-05-09externals: Update SDL to 107db2d8lat9nq
In light of 72a49c2bbcce46c24b6d8ee0592989a507dcd68a, the SDL submodule also needs updated. Updates to the same commit used by the SDL package in ext-windows-bin.
2021-05-08Update SDL2 to SDL2-2.0.15-prerelease.bunnei
- Improves native Switch JoyCon/Pro Controller support.
2021-04-25cmake: Only config Boost during find_packagelat9nq
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-22cmake: Download Boost if inadequate local versionlat9nq
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-21cmake: Suppress SDL2 not found warninglat9nq
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-21cmake: Allow FFmpeg external usage and cleanuplat9nq
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-17cmake: Use SDL 2.0.14 and fix CMake scope issuelat9nq
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-16externals: Add SDL 2.0.12lat9nq
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-15cmake: Remove use of bintray for externals.bunnei
- 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-08externals: Search for shared opus installation.Markus Wick
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-02-09cmake: Update FFmpeg to 4.3.1lat9nq
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-08cmake: Revert FFmpeg 4.3.1 update for Windows buildsameerj
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-06CMakeLists: Use bundled FFmpeg as a fallbacklat9nq
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-05CMakeLists: Update to FFmpeg 4.3.1 for WIN32lat9nq
Minimal binaries go brrrrrrr
2021-02-05CMakeLists: Fixes for linux-freshlat9nq
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-05CMake: Port citra-emu/citra FindFFmpeg.cmakelat9nq
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-05CMake: Implement YUZU_USE_BUNDLED_FFMPEGlat9nq
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-01-21Bump conan SDL2 version to 2.0.14Valeri
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-07CMakeLists: Disable YUZU_ENABLE_BOXCAT if ENABLE_WEB_SERVICE is disabledlat9nq
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-03Update zstd to v1.4.8FearlessTobi
Co-Authored-By: Vitor K <29167336+vitor-k@users.noreply.github.com>
2020-12-24cmake: Always enable VulkanReinUsesLisp
Removes the unnecesary burden of maintaining separate #ifdef paths and allows us sharing generic Vulkan code across APIs.
2020-12-15cmake/conan: Conditionally add target Boost::contextlat9nq
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-13cmake: Fix generating CMake configs and linking with Boostlat9nq
Fixes regression by 761206cf81b271f7f4dd6a167a120325b760dbf3, 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-06CMakeLists,network: Create YUZU_UNIX macro to replace __unix__comex
__unix__ is not predefined on Apple platforms even though they are Unix.
2020-11-08externals: Update fmt to 7.1.2Lioncash
Updates to the latest bugfix release of fmt.
2020-11-03core: Remove usage of unicornLioncash
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-10-29Merge pull request #4831 from lioncash/fmtbunnei
externals: Update fmt to 7.1.0
2020-10-26video_core: NVDEC Implementationameerj
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-26externals: Update fmt to 7.1.0Lioncash
Keeps the used version of the library up to date.
2020-09-09cmake: Update to Qt 5.12.8Morph
2020-08-14CMakeLists: Update fmt to 7.0.3Lioncash
Keeps the library up to date and fixes a few bugs
2020-08-08General: Tidy up clang-format warningsLioncash
2020-07-27CMakeLists: Update boost to 1.73Lioncash
Keeps the library up to date.
2020-07-27CMakeLists: Update catch to 2.13Lioncash
Keeps the library up to date
2020-07-27CMakeLists: Update zstd to 1.4.5Lioncash
Keeps the library version up to date.
2020-07-27CMakeFiles: Update json to 3.8.0Lioncash
Keeps the tracked version of the library up to date.
2020-07-18yuzu: Port translation support from CitraFearlessTobi
Co-Authored-By: Weiyi Wang <wwylele@gmail.com>