Open jwoyame opened 8 years ago
Platform specific sections in gyp can be achieved like this:
"conditions": [
["OS == 'win'", {
Thanks for the response @BergWerkGIS! I would like to add a workflow for platform-specific formats to the project, and I want to do it in the cleanest/preferred way.
First, I suppose I should ask, are platform-specific formats a good idea?
Second, would this be a decent workflow:
OGR_FORMATS_WIN
list to libgdal.sh
.libgdal.sh
use the gyp-templates/libgdal_formats.gypi
template to generate a platform-specific include file arch/win/libgdal_formats.gypi
.arch/win/libgdal_formats.gypi
conditionally in libgdal.gyp
.It is partly a matter of taste, but the above workflow would limit the actual conditional behavior to libgdal.gyp
.
I wanted to add a particular format on Windows like so (
libgdal.sh
):But this will of course produce an include file (
libgdal_formats.gypi
) that includes the GYP file on all platforms. It seems like it would be nice to have platform-specific GYP references, but I can't think of an easy way to fit this in the current workflow. Thoughts?