[Development] About the presence of /System/Library/Frameworks/Carbon.framework
Konstantin Tokarev
annulen at yandex.ru
Thu Jan 4 21:35:38 CET 2018
04.01.2018, 17:51, "Edward Welbourne" <edward.welbourne at qt.io>:
> René J.V. Bertin:
>>>> Here's a silly one: configuring Qt for building on my Linux rig I was told
>>>> that I needed Xcode, and how to get it. :)
>>>>
>>>> Long story short, it turns out that the configure script determines
>>>> whether it's building on Mac by checking if the Carbon framework exists
>>>> in the designated location. And it turns out that I copied over the
>>>> entire header dir. structure under /System/Library/Frameworks onto said
>>>> Linux rig because I use it for cross-platform development.
>>>>
>>>> Apart from the fact that it should probably check for a framework with a
>>>> more certain future, isn't there a less "rootsy" way of determining
>>>> whether the script is running on Mac?
>
> On quinta-feira, 21 de dezembro de 2017 04:47:34 CST Konstantin Tokarev wrote:
>>> Check uname maybe?
>
> Thiago Macieira (21 December 2017 12:54) replied:
>> That would tell you the host you're running on, not the target you're
>> compiling to.
>>
>> If your sysroot contains Apple files, it's reasonable to conclude it's an
>> Apple system.
>
> Well, it's reasonable to conclude you're set up to be capable of
> compiling for an Apple system; as here, it's possible this may be for
> the sake of cross-compiling; but the fact of having the means to
> cross-compile for a particular target does not mean that every build
> done on this machine necessarily is a cross-compile for that target.
>
> It does sound like we're a little too enthusiastic about jumping to a
> conclusion here - is there a better way to decide what we're compiling
> for ? Surely we should ignore uname if configure has options that
> explicitly ask for cross-compilation; but it's a reasonable thing to
> consult otherwise, when auto-detecting in the absence of explicit
> instructions - in particular, more to be trusted than the existence of
> (possibly non-native) frameworks,
Note that in opening letter different question was asked, namely how to
detect if script is running on Mac or not, presumably to avoid asking Linux
users to install Xcode.
>
> Eddy.
> _______________________________________________
> Development mailing list
> Development at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/development
--
Regards,
Konstantin
More information about the Development
mailing list