Skip to content
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

Easy crossplatform build option #67

Open
EpicCatto opened this issue Nov 12, 2023 · 2 comments
Open

Easy crossplatform build option #67

EpicCatto opened this issue Nov 12, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@EpicCatto
Copy link

cmake --build . --config Release only created native_library.dll
image
Instead of expected

x64-windows.dll
x64-linux.so
x86-windows.dll
x64-macos.dylib
arm64-linux.so
arm64-windows.dll
@radioegor146
Copy link
Owner

If you need all the other libraries, you need to compile C++ for other platforms manually.
Right now there is no easy crossplatform build option, but some time later it may be implemented.

@radioegor146 radioegor146 changed the title CMake Build native_library.dll instead of <platform> Easy crossplatform build option Nov 16, 2023
@radioegor146 radioegor146 added the enhancement New feature or request label Nov 16, 2023
@radioegor146
Copy link
Owner

So after my initial thoughts about the issue, there is currently only one option that fits all platforms and is fairly easy to set up: zig. It provides a compatible C/C++ compiler.
However, it is not clear about how to properly integrate it into this project, although I have some options from the top of my head:

  1. Create an additional subproject that allows people to very easily use Zig just by providing the directory with the project (but this approach eliminates an easy option to edit result C++ code in IDE and build it in it in the same configuration as new subproject will)
  2. Add another variant of the CMake file that uses Zig, however, users still will need to manually compile all the libraries, because as for now, there is no easy approach for using multiple toolchains on a single CMake project
  3. Provide a guide on how to use Zig with CMake as it is

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants