rswinkle / PortableGL

An implementation of OpenGL 3.x-ish in clean C
MIT License
1.05k stars 49 forks source link

fix projects for non-gmake configs #13

Closed RicoP closed 1 year ago

RicoP commented 1 year ago

configuration always takes all settings that come after. Indentation isn't playing a role. So for non gmake projects all files would also be excluded.

To fix that I moved configuration { "gmake" } to the end of the project.

Alternatively i could also write

configuration { "gmake" }
    buildoptions { ... }
configuration { }
...

configuration { } is kinda like a else statement.

rswinkle commented 1 year ago

configuration always takes all settings that come after. Indentation isn't playing a role. So for non gmake projects all files would also be excluded.

I know. I don't use it except to generate makefiles which I include in the repo as the primary way to build (on any platform including windows and mac (untested)). Notice there are no other configurations in the premake script.

That being said, it is kind of a flaw in in premake4's design which is why they added filters in premake5.

I already updated the script for the examples to use premake5 but was waiting to update the rest till premake5 was out of beta. It's just taking longer than I expected so maybe I should go ahead and do that now.

I'll keep this open as a reminder till I update the other premake scripts are updated to premake5 as well but you should be able to generate project files (other than gmake) successfully for the examples. Let me know if that's not true.

EDIT: formatting

rswinkle commented 1 year ago

See latest update to README.