Making a port - debugging cmake check_include_file
Matthew D. Fuller
fullermd at over-yonder.net
Sat Apr 23 22:02:42 UTC 2016
On Sat, Apr 23, 2016 at 11:51:00PM +0300 I heard the voice of
abi, and lo! it spake thus:
> /usr/bin/cc -O2 -pipe -fstack-protector -fno-strict-aliasing -o
> CMakeFiles/cmTC_bd985.dir/CheckIncludeFile.c.o -c
> fatal error: 'libv4l1-videodev.h' file not found
> #include <libv4l1-videodev.h>
> 1 error generated.
Note lack of -I/usr/local/include in the command. So cmake isn't
looking there. You'd need to somehow get that in the list.
Of course, it'd actually be spelled $LOCALBASE, presumably. Actually,
libv4l does install pkgconf stuff, so if the cmake process could be
tweaked to pull that in, that may be the "best" solution. Look at the
FindPkgConfig module in cmake
Of course, that does mean doing a fair amount more surgery in the
CMakeFile. Simpler may just be to pass $LOCALBASE in via CMAKE_ARGS
and then manually add that via include_directories().
Matthew Fuller (MF4839) | fullermd at over-yonder.net
Systems/Network Administrator | http://www.over-yonder.net/~fullermd/
On the Internet, nobody can hear you scream.
More information about the freebsd-ports