You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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,
Steps to reproduce:
ACE_DEBUG
cmake switch set toON
- this will set the define with same namemake install
the ACE libraryfind_library()
to include libace in your projectExpected behavior:
ACE_DEBUG
define persists and is used in ACE headersActual behavior:
ACE_DEBUG
is not set when building user's project, because it's only set when calling the ACE's CMakeLists.txtPossible 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.The text was updated successfully, but these errors were encountered: