frang75/nappgui_src

"Unsupported macOS version: macosx11.0" when trying to configure.

Opened this issue · 4 comments

Hi Franciso

I had to make the following hacky fixes in my local fork of nappgui in order to get the cmake config to succeed in my project:

colugomusic@684606f

Note that in my project I am setting CMAKE_OSX_SYSROOT to macosx11.0 and CMAKE_OSX_DEPLOYMENT_TARGET to 11.0 since I want to support some older versions of macOS.

The nappgui cmake scripts incorrectly assume that the value of CMAKE_OSX_SYSROOT will be a version number without any prefix string. At least on my system this is not the case (perhaps this is something that changed with newer versions of macOS.)

So I just added the calls to string(REPLACE ...) to strip out this prefix before the comparisons.

Hi @colugomusic !
Normally, it is not necessary to change CMAKE_OSX_SYSROOT (I never touch it). I leave the BaseSDK that comes by default in every version of Xcode. To ensure that the application works on older versions of macOS, I set the variable DCMAKE_OSX_DEPLOYMENT_TARGET=11.0. I will check it, but so far I have not found any problems running Xcode from 3.6.

I set this up a couple years ago so I don't remember the exact details, but in my project it was necessary to download an old version of the SDK from https://github.com/phracker/MacOSX-SDKs in order to get things to build, so that's why I am also setting CMAKE_OSX_SYSROOT

You can have different Xcode versions installed, and switch between them with xcode-select. It will "force" the base SDK.
https://nappgui.com/en/guide/win_mac_linux.html#h5.2

I think this is the "official" way to do it. However, I will check the link you mentioned.

Interesting thanks, that seems like a cleaner way of doing things if it works. Though I wonder if that would still allow me to use the latest c++ compiler. I will give it a try tomorrow.