Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR Content
This PR contains the change for
mobto use VCPKG instead of custom stuff to build third-party dependencies. The only things that should be build bymobafter this are:modorganizer_superexceptcmake_commonAside from removing the tasks for third-party dependencies, the main changes for
mobis the use of the CMake presets from the various MO2 repository and the use ofcmakeitself to build install (prior to thismobwould callmsbuild).VCPKG
Most dependencies are fetch from the official VCPKG registry, but some are built from MO2 registry.
The dependencies that are prefixed with
mo2-are specific to MO2:mo2-dds-header- this is a very small port that make theDDS.hheader from DirectXTex available. This header is private and not part ofDirectXTexofficial port, maybe there is a reason for that...mo2-bsatk,mo2-esptk- these are ports to build bsatk/esptk when building in standalone mode (see below), these are not prebuiltmo2-cmake- this is the port forcmake_common, all MO2 repositories (except USVFS) depend on this, even when building withmobmo2-libbsarch- this is the port forlibbsarch, using prebuilt libbsarch, and used when building MO2 (including build withmob)mo2-uibase- this is a port foruibasethat is used when building in standalone mode (see below)The other dependencies are either not part of MO2 directly but either not available on the official registry (e.g.
libloot) or require slight changes.libloot- this is a port forliblootusing prebuilt (same as before), buildingliblootrequires way too many dependencies to build it within the portasmjit- adaptation of the official port to use an old commit instead of the current onepybind11- official port without the Python dependencyspdlog- official port customized to remove thefmtdependency (forcestd::format)7zip- custom port that uses the officialCMakeLists.txtbut forces dynamic linking (see below)x64-windows-static-md. I was not able to adapt MO2 code (or even a very small example) to work with a statically built 7zip. One could use a custom triplet to build7zipin dynamic mode and everything else statically, but using a custom triplet prevents VCPKG from sharing the build between components that have different triplets. Since the main repository needs7zip(forarchive) and has many Boost dependencies, it means re-compiling most of Boost because of this. I found it much simpler to use a custom port and force 7zip to dynamic mode.cmake_commonThe
cmake_commonutilities are now available as a VCPKG port calledmo2-cmake. I made a lot of refactoring to remove not very useful stuff and allow more flexibility when using the available functions:mo2_configure_xxxstuff to keep onlymo2_configure_targetandmo2_configure_plugin, the other functions (uibase, executable, library, etc.) where not very useful,mo2_install_targetformo2_install_plugininstall(TARGETS ...)stuff (.lib,.dll, etc.)instalL(FILES) use generator expression$<TARGET_FILE:xxx>and$<TARGET_FILE_PDB:xxx>.cmake_configure_targetinto multiple functions so you can either usecmake_configure_targetor the independent functions for more control, also added options tocmake_configure_targetcmake_configure_targetwithout having the sources added automatically, to allow more control and avoid automatic use ofGLOB_RECURSE+CONFIGURE_DEPENDSPyQtwhen requiredTo-Do List
CMakePresets.json).mobdependencies to VCPKG itself.