Closed mega-lia closed 3 years ago
megasdk-crossAndroid-PRs SUCCEDED (1534) :+1:
megasdk-crossAndroid-PRs SUCCEDED (1535) :+1:
megasdk_PR FAILED (3877) :-1:
megasdk-winx64-PRs SUCCEDED (1359) :+1:
megasdk_PR FAILED (3878) :-1:
megasdk-winx64-PRs FAILED (1360) :-1:
Builds off of Matt's work on the
build3rdparty
tool, adding support for macOS with new features added to address issues that turned up therein. In particular:New triplet
x64-osx-mega
This is borrowed wholesale from @aabellagm -- a custom vcpkg triplet file which is the preferred way to build mac dependencies (and the one assumed by the
CMakeLists.txt
. Its main feature is to specify dynamic library builds for certain libraries based on licensing issues and/or conformance with the Windows approach. Note that the official vcpkg mac tripletx64-osx
builds static, andx64-osx-dynamic
is a "community triplet" without official support, so some port require (or may require in the future) patches, see below.CMake changes
Fixed a bug/corner case in the old implementation of
ImportStdVcpkgLibrary
where, if the libary was not installed by vcpkg orlibrary.a
did not exist, the function would fail silently and attempt to link the system installed version of the library. Failure to find the desired library name is now a fatal error, and the function checks first for static libraries and then dynamic libraries to accommodate dynamic libraries installed by thex64-osx-mega
triplet.Some minor updates/cleanups as well.
Patch files
A port entry
library/version
may now havelibrary/version:some-patch.patch
to indicate a patch that should be applied to the port forlibrary
. The filesome-patch.patch
shall name a patch incmake/vcpkg_patches
, which shall be applicable in the directoryvcpkg/ports/library
. Currently only one patch is supported with the syntax, and if there are duplicate entries in the preferred ports, e.g.,this is an error. These patches are meant to make simple adjustments to the build/install logic for vcpkg ports; attempting more advanced operations is ill-advised. Patches give us further recourse to avoid introducing ports in
vcpkg_extra_ports
, but if you need to make a lot of source level changes to a library you should make them that way.Applications
bin/
dir from a vcpkg install of curl. vcpkg does post-build validation to make sure there are no empty directories after an install, and hence deletes thebin/
dir on static library or linux builds . As mentioned above, they don't properly support dynamic linkage builds on mac so we need to tell them it's ok for the directory to be empty there too.typedef BOOL
fromFreeImage.h
which conflicts with objC headersPlatform include/exclude expressions
A port entry may look like
The
!platform
means do not build on that platform; without the!
means only on that platform. Currently supportedplatform
arewindows
,linux
,osx
.Applications
freeglut
is not built on macreadline
is only built on macpkgconfig suppression
You can now pass
--nopkgconfig
tobuild3rdparty
to indicate that the port files should not worry about anything to do withpkgconfig
. This is accomplished with some CMake trickery that patches vcpkg's script files to replacepkgconfig
-related operations with no-ops.