Changeset d943a843 in subsurface


Ignore:
Timestamp:
Jul 15, 2017, 2:18:33 PM (5 days ago)
Author:
Dirk Hohndel <dirk@…>
Branches:
master
Children:
8c31a17
Parents:
5656509
Message:

Mac build: deal with libdivecomputer and pkg-config

libdivecomputer asks pkg-config for the include paths for libusb-1.0 and
hidapi, but then uses #include <libusb-1.0/libusb.h> and <hidapi/hidapi.h>
which fails as those directories are part of the include path. So we
manually add include paths without that last directory as well as a work
around.

Signed-off-by: Dirk Hohndel <dirk@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • scripts/build.sh

    r5656509 rd943a843  
    212212                make -j4
    213213                make install
     214        else
     215                # we are getting libusb and hidapi from pkg-config and that goes wrong
     216                # or more specifically, the way libdivecomputer references
     217                # the include files goes wrong
     218                LIBDC_CFLAGS=-I$(dirname $(pkg-config --cflags libusb-1.0 | sed -e 's/^-I//'))
     219                LIBDC_CFLAGS="${LIBDC_CFLAGS} -I$(dirname $(pkg-config --cflags hidapi | sed -e 's/^-I//'))"
     220                echo $LIBDC_CFLAGS
    214221        fi
    215222
     
    277284        autoreconf --install ..
    278285fi
    279 CFLAGS="$OLDER_MAC -I$INSTALL_ROOT/include" ../configure --prefix=$INSTALL_ROOT --disable-examples
     286CFLAGS="$OLDER_MAC -I$INSTALL_ROOT/include $LIBDC_CFLAGS" ../configure --prefix=$INSTALL_ROOT --disable-examples
    280287make -j4
    281288make install
Note: See TracChangeset for help on using the changeset viewer.