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
mob
to use VCPKG instead of custom stuff to build third-party dependencies. The only things that should be build bymob
after this are:modorganizer_super
exceptcmake_common
Aside from removing the tasks for third-party dependencies, the main changes for
mob
is the use of the CMake presets from the various MO2 repository and the use ofcmake
itself to build install (prior to thismob
would 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.h
header from DirectXTex available. This header is private and not part ofDirectXTex
official 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 withmob
mo2-libbsarch
- this is the port forlibbsarch
, using prebuilt libbsarch, and used when building MO2 (including build withmob
)mo2-uibase
- this is a port foruibase
that 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 forlibloot
using prebuilt (same as before), buildinglibloot
requires 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 thefmt
dependency (forcestd::format
)7zip
- custom port that uses the officialCMakeLists.txt
but 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 build7zip
in 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_common
The
cmake_common
utilities 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_xxx
stuff to keep onlymo2_configure_target
andmo2_configure_plugin
, the other functions (uibase, executable, library, etc.) where not very useful,mo2_install_target
formo2_install_plugin
install(TARGETS ...)
stuff (.lib
,.dll
, etc.)instalL(FILES
) use generator expression$<TARGET_FILE:xxx>
and$<TARGET_FILE_PDB:xxx>
.cmake_configure_target
into multiple functions so you can either usecmake_configure_target
or the independent functions for more control, also added options tocmake_configure_target
cmake_configure_target
without having the sources added automatically, to allow more control and avoid automatic use ofGLOB_RECURSE
+CONFIGURE_DEPENDS
PyQt
when requiredTo-Do List
CMakePresets.json
).mob
dependencies to VCPKG itself.