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

Use premake to build Win32/Win64 #139

Open
JCash opened this issue Jan 20, 2022 · 4 comments
Open

Use premake to build Win32/Win64 #139

JCash opened this issue Jan 20, 2022 · 4 comments

Comments

@JCash
Copy link
Contributor

JCash commented Jan 20, 2022

So far I've only been able to configure a 32+64 bit library build using the visual studio solution.
That is also generating only Win32, so you have to clone the config, create a x64 config.
Lastly, you also have to change the dynamic linkage to static.

I think it would be beneficial if it would be possible to use the platform/arch with the build script, e.g.:
build.sh release Win32 / build.sh release Win64

@lvdpower
Copy link

Please explain me how to build rive-cpp under windows! Is it possible to do it with the cmake?

@JCash
Copy link
Contributor Author

JCash commented Jan 21, 2022

Hi @lvdpower !

I haven't tested it, but you should be able to generate cmake files with premake5 cmake.

The problem I have with generating a set of build system files, is that the premake config script doesn't take the different settings into account (win32 + win64, static linkage).

@projectitis
Copy link

projectitis commented Feb 28, 2022

@lvdpower This is how I did it:
premake5 vs2019
This generates the solution and project files, which you can then open in Visual Studio.
As @JCash mentioned, there was no "Release/x64" profile, so I created that (based on the Release/win32 profile).

To actually get it to compile you need to do two things:

  1. Remove all the command line options because they are not compatible (Clear this field: Properties > C/C++ > Command line > Additional options)
  2. Apply the fix in my PR here, which will hopefully be accepted (in some form)

Then you can compile.

@madoodia
Copy link

@projectitis
This means we can build it with cl.exe instead of clang?
I really like to build it in windows!

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

No branches or pull requests

4 participants