Skip to content

'cflags': ignored #152

@Gottox

Description

@Gottox

Hi!

I'm currently porting an addon from Debian-Linux to MacOSX. I'm using pkg-config to create the cflags.

binding.gyp:


    'targets': [{
        'target_name': 'pdfutils',
        "sources": [ "src/document.cc", "src/page.cc", "src/page_job.cc", "src/init.cc", "src/util.cc", "src/formats.cc" ],
        'cflags': [
            '<!@(pkg-config --cflags poppler-glib cairo)'
        ],
        'ldflags': [
            '<!@(pkg-config --libs-only-L --libs-only-other poppler-glib cairo)'
        ],
        'libraries': [
            '<!@(pkg-config --libs-only-l poppler-glib cairo)'
        ]
    }]
}

On both, Debian and Mac, pkg-config ... poppler-glib cairo works as expected:

Debian:

# pkg-config --cflags poppler-glib
-I/usr/include/poppler/glib -I/usr/include/poppler -I/usr/include/glib-2.0 -I/usr/lib/i386-linux-gnu/glib-2.0/include -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12
# 

Mac:

# pkg-config --cflags poppler-glib
-I/opt/local/include/poppler/glib -I/opt/local/include/poppler -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include -I/opt/local/include/cairo -I/opt/local/include/pixman-1 -I/opt/local/include/freetype2 -I/opt/local/include/libpng15
#

But under Mac, there is none of the flags written to build/....target.mk

Debian:

# grep -r png build/*
build/pdfutils.target.mk:   -I/usr/include/libpng12 \
build/pdfutils.target.mk:   -I/usr/include/libpng12 \
#

Mac:

# grep -r png build/*
#

This results in a compiler error on Mac.

Is this a bug? Or am I doing something wrong?

regards
Enno

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions