Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 24 Apr 2016 01:28:35 +0300
From:      abi <abi@abinet.ru>
To:        freebsd-ports@freebsd.org
Subject:   Re: Making a port - debugging cmake check_include_file
Message-ID:  <571BF713.4040607@abinet.ru>
In-Reply-To: <20160423215530.GP83618@over-yonder.net>
References:  <571BE034.9070200@abinet.ru> <20160423215530.GP83618@over-yonder.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Thanks!
If speak about general purpose solution, acceptable by upstream, I should
1. make cmake variable like INCLUDE_DIR_EXTRA
2. if set, include it contents.
3. add default value if platform is FreeBSD
Am I right?

On 24.04.2016 00:55, Matthew D. Fuller wrote:
> 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
>> /usr/home/abishai/zoneminder/work/ZoneMinder-5a3978f/CMakeFiles/CMakeTmp/CheckIncludeFile.c
>> /usr/home/abishai/zoneminder/work/ZoneMinder-5a3978f/CMakeFiles/CMakeTmp/CheckIncludeFile.c:1:10:
>> 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
> (https://cmake.org/cmake/help/v3.5/module/FindPkgConfig.html).
>
> 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().
>
>
>




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?571BF713.4040607>