You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
The current version of xmake (2.8.8) does not support XCode project generation directly, it generates XCode project files by translating xmake scripts to CMake scripts, then uses CMake genrator to generate XCode project files. In practice, I found at least two problems caused by this translation process:
All custom building functions used in xmake scripts (like before_build, after_build, before_install, after_install, etc) will not be called when performing building actions in XCode, since they are lua functions and cannot be processed by CMake building system.
For some reasons, if we need to change the building options (options added by target:add_options) in xmake, we don't get these option changes applied in XCode projects until we delete all CMake/XCode files and regenerate them from scrach (simply regenerating XCode project files by xmake project -k xcode won't take effect if we don't delete all existing CMake and XCode files).
These problems can be solved by implementing a native XCode project generator, just like we have already done for Visual Studio (vsxmake2019). As the documentation says:
After we have time, we will re-implement each more complete xcode output plugin by ourselves, and welcome everyone to contribute.
I wonder if we currently have any plan on implementing a native XCode project generator, and if not, this issue can be used to track this feature if somebody has time to development such generator later.
Describe the solution you'd like
We want a native XCode project generator that generates XCode project files directly from xmake.lua project scripts. When performing building, installing and cleaning actions in XCode, this project file will call xmake to perform real building tasks, so that all custom building functions can be used, and changes to xmake options will take effect immediately in XCode projects.
Describe alternatives you've considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered:
Hi,
just to notify that I'm starting working on this issue. The following features will be included in the first release of this new generator (Milestone 1):
Generate Xcode projects from xmake.lua directly, without the need of CMake installation.
Map files, builds rules and targets to corresponding Xcode concepts (files, groups, configurations, targets, etc).
Triggering build in Xcode invokes xmake to build targets by using custom building phases of Xcode. xmake callbacks like before_build, after_build, before_install, after_install, etc will be called as expected.
Redirect xmake build directory to Xcode BUILD_DIR, so that invoking Clean build folder in Xcode will remove all xmake intermediate and output files as expected.
Running & debugging in Xcode is supported, with additional graphics debugging support if the application uses Metal.
The following known features may be deferred to Milestone 2 or later:
Currently only MacOS targets are supported. iOS, watchOS, tvOS, visionOS targets are not tested and may require additional refinement of the generator. I plan to test and support iOS targets on Milestone 2, other platforms may require community contributions to be supported (since I don't have corresponding test devices).
Custom options specified in xmake.lua is currently ignored in Xcode build actions. I plan to support this in Milestone 2.
Currently only Xcode build and run actions are supported. test, profile and deploy actions are currently not supported, and may require community contributions to support.
The first release of the new Xcode project generator plugin will be published in the mid of 2025. Stay tuned while I'm working on this.
Is your feature request related to a problem? Please describe.
The current version of xmake (2.8.8) does not support XCode project generation directly, it generates XCode project files by translating xmake scripts to CMake scripts, then uses CMake genrator to generate XCode project files. In practice, I found at least two problems caused by this translation process:
before_build
,after_build
,before_install
,after_install
, etc) will not be called when performing building actions in XCode, since they are lua functions and cannot be processed by CMake building system.target:add_options
) in xmake, we don't get these option changes applied in XCode projects until we delete all CMake/XCode files and regenerate them from scrach (simply regenerating XCode project files byxmake project -k xcode
won't take effect if we don't delete all existing CMake and XCode files).These problems can be solved by implementing a native XCode project generator, just like we have already done for Visual Studio (
vsxmake2019
). As the documentation says:I wonder if we currently have any plan on implementing a native XCode project generator, and if not, this issue can be used to track this feature if somebody has time to development such generator later.
Describe the solution you'd like
We want a native XCode project generator that generates XCode project files directly from xmake.lua project scripts. When performing building, installing and cleaning actions in XCode, this project file will call xmake to perform real building tasks, so that all custom building functions can be used, and changes to xmake options will take effect immediately in XCode projects.
Describe alternatives you've considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: