AmigaPorts / AmigaPorts/ACE

static builds of ACE ignore its build flags

Aperta
#225 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
bug help wanted
Lingua principale
C
Stelle
223
Fork
38
Merge medio
1g 5h
PR unite (30g)
6

Descrizione

Steps to reproduce:

- build libace.a with `ACE_DEBUG` cmake switch set to `ON` - this will set the define with same name
- `make install` the ACE library
- use `find_library()` to include libace in your project

Expected behavior:

- `ACE_DEBUG` define persists and is used in ACE headers

Actual behavior:

- `ACE_DEBUG` is not set when building user's project, because it's only set when calling the ACE's CMakeLists.txt

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.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.