paulocoutinhox / xmake-test

0 stars 0 forks source link

Questions about the project Xmake #1

Open paulocoutinhox opened 2 years ago

paulocoutinhox commented 2 years ago

Im trying make a project like Ezored, but with Xmake.

So, i have some questions about the project Xmake to understand that it is possible.

I make some tests here: https://github.com/paulo-coutinho/xmake-test/actions

It is building without any dependency to macos, ios, tvos and watchos.

Something pending:

  1. Need pass version outside this to the C++ like this: https://github.com/ezored/ezored/blob/main/files/targets/macos/conan/recipe/conanfile.py#L56 https://github.com/ezored/ezored/blob/main/files/targets/macos/cmake/CMakeLists.txt#L113
  2. Need pass TARGET_NAME to the C++ (a simple string - maybe a definition?)
  3. What is the best option: One xmake.lua file for each target (ios, android, test, macos, windows, linux)?
  4. Need pass parameters from outise (python call) to this lua file (xmake.lua)
  5. How to build for Macos Catalyst? Example: https://github.com/ezored/ezored/blob/main/files/config/target_ios.py#L51-L58
  6. How to build with iOS/macOS Bitcode enabled or disabled? Example: https://github.com/ezored/ezored/blob/main/files/config/target_ios.py#L66
  7. How to build with iOS min-version defined? Example: https://github.com/ezored/ezored/blob/main/files/config/target_ios.py#L17

Can anyone help me?

waruqi commented 2 years ago

1, 2, 4: use custom option() and xmake f --myopt=xxx, you can see docs.

  1. xmake f -p linux, xmake f -p iphones, ...

  2. xmake f -p iphoneos -a x86_64? I'm not sure, because I haven't tried it, maybe some configuration needs to be added to better support it

  3. use add_ldflags/add_mxflags add bitcode flag

  4. xmake f -p iphoneos --target_minver=xxx

paulocoutinhox commented 2 years ago

@waruqi in point number 3 i have:

Is better create only one xmake.lua for all and check xmake target or my custom param called "target-name" (ios, android, macos, etc). Or is better create one xmake.lua for each my target (one for ios, one for android, one for macos, one for windows etc)?

paulocoutinhox commented 2 years ago

@waruqi about mac catalyst:

to maccatalyst we need more options, because xmake f -p iphoneos -a x86_64 it build for simulator.

waruqi commented 2 years ago

@waruqi in point number 3 i have:

  • framework for iOS, tvOS and watchOS
  • shared lib for Android
  • app for windows, linux and macos

Is better create only one xmake.lua for all and check xmake target or my custom param called "target-name" (ios, android, macos, etc). Or is better create one xmake.lua for each my target (one for ios, one for android, one for macos, one for windows etc)?

Usually only one xmake.lua is needed, you can use

if is_plat("android") then
     set_kind("shared") 
end

to set different configurations according to different platforms.

waruqi commented 2 years ago

@waruqi about mac catalyst:

to maccatalyst we need more options, because xmake f -p iphoneos -a x86_64 it build for simulator.

You can submit a feature request to issues and wait for improvement. But I don't have much time lately, maybe you need to wait until next week before I have time to look at it.

paulocoutinhox commented 2 years ago

Nice.

Enjoying, the project is maintained only by you? Or have a company behind it?

If you die, the project have a team/leader to continue it?

waruqi commented 2 years ago

Nice.

Enjoying, the project is maintained only by you? Or have a company behind it?

If you die, the project have a team/leader to continue it?

only me, personal project.