diff --git a/docs/Development.md b/docs/Development.md index 72400476d8..0db4131dbb 100644 --- a/docs/Development.md +++ b/docs/Development.md @@ -7,6 +7,16 @@ * **FreeBSD**: [FreeBSD Building Guide](./docs/build/FreeBSD.md) * **macOS**: [macOS Building Guide](./docs/build/macOS.md) +# CPM + +CPM (CMake Package Manager) is the preferred method of managing dependencies within Eden. Documentation on adding dependencies/using CPMUtil is in the works. + +Notes: +- `YUZU_USE_CPM` is set by default on MSVC and Android. Other platforms should use this if certain "required" system dependencies (e.g. OpenSSL) are broken or missing +- `CPMUTIL_DEFAULT_SYSTEM` can be set to `OFF` to force the usage of bundled dependencies. This can marginally decrease the final package size. +- When adding new prebuilt dependencies a la OpenSSL, SDL2, or FFmpeg, there *must* be a CMake option made available to forcefully download this bundle. See the OpenSSL implementation in the root CMakeLists for an example. + * This is necessary to allow for creation of fully-qualified source packs that allow for offline builds after download (some package managers and distros enforce this) + # Guidelines ## License Headers diff --git a/docs/build/FreeBSD.md b/docs/build/FreeBSD.md index 059f757361..475378125c 100644 --- a/docs/build/FreeBSD.md +++ b/docs/build/FreeBSD.md @@ -1,12 +1,13 @@ ## One word of caution before proceeding. + This is not the usual or preferred way to build programs on FreeBSD. -As of writing there is no official fresh port available for eden-emu, but it is in the works. -After it is available you can find a link to the eden-emu fresh port here and on Escarys github repo. -See this build as an App Image alternative for FreeBSD. +As of writing there is no official fresh port available for Eden, but it is in the works. +After it is available you can find a link to the eden-emu fresh port here and on Escary's github repo. +See this build as an AppImage alternative for FreeBSD. ## Dependencies. Before we start we need some dependencies. -These dependencies are generally needed to build eden-emu on FreeBSD. +These dependencies are generally needed to build Eden on FreeBSD. ``` devel/cmake @@ -56,8 +57,6 @@ Change into that build directory: cd build ``` -Now choose one option either 1 or 2, but not both as one option overwrites the other. - #### 1. Building in Release Mode (usually preferred and the most performant choice): ```sh cmake .. -GNinja -DYUZU_TESTS=OFF @@ -81,3 +80,6 @@ OR ```sh doas -- ninja install ``` + +## OpenSSL +The available OpenSSL port (3.0.17) is out-of-date, and using a bundled static library instead is recommended; to do so, add `-DYUZU_USE_CPM=ON` to your CMake configure command. \ No newline at end of file diff --git a/docs/build/Linux.md b/docs/build/Linux.md index e668c16b5b..ab653dad00 100644 --- a/docs/build/Linux.md +++ b/docs/build/Linux.md @@ -12,7 +12,7 @@ The following are handled by Eden's externals: * [SDL2](https://www.libsdl.org/download-2.0.php) 2.0.18+ * [opus](https://opus-codec.org/downloads/) 1.3+ -All other dependencies will be downloaded and built by [CPM](https://github.com/cpm-cmake/CPM.cmake/) if `YUZU_USE_CPM` is on, but will use system dependencies if available: +All other dependencies will be downloaded and built by [CPM](https://github.com/cpm-cmake/CPM.cmake/) if `YUZU_USE_CPM` is on, but will always use system dependencies if available: * [Boost](https://www.boost.org/users/download/) 1.79.0+ * [Catch2](https://github.com/catchorg/Catch2) 2.13.7 - 2.13.9 diff --git a/docs/build/Solaris.md b/docs/build/Solaris.md index f70f82428e..d4cfdbb6a9 100644 --- a/docs/build/Solaris.md +++ b/docs/build/Solaris.md @@ -27,7 +27,7 @@ Patch for FFmpeg: sed -i 's/ make / gmake /' externals/ffmpeg/CMakeFiles/ffmpeg-build.dir/build.make ``` -- **Configure**: `cmake -B build -DENABLE_WEB_SERVICE=OFF -DENABLE_OPENSSL=OFF -DCMAKE_CXX_FLAGS="-I/usr/include/SDL2" -DCMAKE_C_FLAGS="-I/usr/include/SDL2"`. +- **Configure**: `cmake -B build -DYUZU_USE_CPM=ON -DCMAKE_CXX_FLAGS="-I/usr/include/SDL2" -DCMAKE_C_FLAGS="-I/usr/include/SDL2"`. - **Build**: `cmake --build build`. - **Installing**: `sudo cmake --install build`. @@ -48,4 +48,4 @@ export LIBGL_ALWAYS_SOFTWARE=1 - Modify the generated ffmpeg.make (in build dir) if using multiple threads (base system `make` doesn't use `-j4`, so change for `gmake`). - If using OpenIndiana, due to a bug in SDL2 cmake configuration; Audio driver defaults to SunOS ``, which does not exist on OpenIndiana. -- System OpenSSL is too old and must be build from source to use it +- System OpenSSL generally does not work. Instead, use `-DYUZU_USE_CPM=ON` to use a bundled static OpenSSL, or build a system dependency from source. \ No newline at end of file