AmigaPorts / ACE

Amiga C Engine
Mozilla Public License 2.0
154 stars 25 forks source link

static builds of ACE ignore its build flags #225

Open tehKaiN opened 1 month ago

tehKaiN commented 1 month ago

Steps to reproduce:

Expected behavior:

Actual behavior:

Possible solution variant 1:

When installing the library, create the cmake script which will be called upon finding the ACE library, which will set same defines as its build phase. That could be done with generating custom FindACE.cmake and installing it along with the library. This should work, but my gut tells me it's not the way to go.

Possible solution variant 2:

When building the library, ace_config.h could be created, which would store all the required ACE defines. this would also clear up the compile commands a bit, making it a bit lighter on parameter-specified defines. This works similarly to libjpeg and other "big" and "serious" libraries, so I think it's a good pattern to pursue.

Vairn commented 1 month ago

Well, the libname_config.h is a common design/development pattern used for this situation, some libraries generate it, some have it so you can edit it to turn on/off features you want. Some even have a build/compile parameter where you can specify your own config file to use for the build. Could be good, then we can add the USE_ECS_FEATURES, USE_AGA_FEATURES, ACE_DEBUG to it, and the compiler adapt accordingly.

Have to have a looksie if there are any other defines etc,

So it is a +1 from me.