-
-
Notifications
You must be signed in to change notification settings - Fork 187
add macosx support #130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add macosx support #130
Conversation
yes7rose
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tested on macos 13.6, apple clang 15 with gmake
utelle
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In its current form I can't accept the PR, because it is too specific for your personal development environment and doesn't distinguish cleanly between compiler and platform specific options. For example, it breaks the build support for gcc on Windows platforms.
Build support for MacOS is already available via autoconf/automake.
| local function wxSetTargetDirectory(arch, build) | ||
| -- Target directory | ||
| if (is_msvc) then | ||
| if arch == "MacOsx" then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MacOsx is not an architecture, but a platform or system. You are dropping the compiler-specific part from the path, but even on MacOS you could use different compilers like gcc or clang.
|
|
||
| filter { "platforms:MacOsx" } | ||
| system "macosx" | ||
| architecture "x64" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When adding MacOS support it should not be restricted to x64. Modern MacOS computers would require ARM64 support.
| filter { "configurations:Debug", "platforms:Win64" } | ||
| wx_config {Unicode="yes", Version=_OPTIONS["wx_ver"], Static="yes", Debug="yes", Arch="Win64", WindowsCompiler=wx_compiler, Libs=wxlibs } | ||
| filter { "configurations:Debug", "platforms:MacOsx" } | ||
| wx_config {Unicode="yes", Version=_OPTIONS["wx_ver"], Static="yes", Debug="yes", Libs=wxlibs, Root="/Users/wangrongwen/cpp/wxtest/wxlib" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here you are using an absolute path for Root containing your personal user id. This is not acceptable for generic build support.
| filter { "configurations:Release wxDLL", "platforms:Win64" } | ||
| wx_config {Unicode="yes", Version=_OPTIONS["wx_ver"], Static="no", Debug="no", Arch="Win64", WindowsCompiler=wx_compiler, Libs=wxlibs } | ||
| filter { "configurations:Release wxDLL", "platforms:MacOsx" } | ||
| wx_config {Unicode="yes", Version=_OPTIONS["wx_ver"], Static="no", Debug="no", Libs=wxlibs, Root="../wxlib" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most likely the relative path for Root is also specific for your personal environment setup.
| workspace "wxsqlite3" | ||
| configurations { "Debug", "Release", "Debug wxDLL", "Release wxDLL", "Debug DLL", "Release DLL" } | ||
| platforms { "Win32", "Win64" } | ||
| platforms { "Win32", "Win64", "MacOsx" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Premake has no predefined platforms. Here platform names could be for example something like MacOS_x64 or MacOS_ARM64.
| "_FILE_OFFSET_BITS=64" | ||
| } | ||
|
|
||
| if (is_msvc) then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This statement makes the following defines compiler-specific. That is wrong. On Windows the same defines are relevant for the gcc compiler as well.
add support macosx premake option