Making a port - debugging cmake check_include_file

abi abi at abinet.ru
Sun Apr 24 09:09:56 UTC 2016


Nope, the same behavior.
ZM has OS detection block, I added there
set(CMAKE_REQUIRED_INCLUDES "/usr/include" "/usr/local/include") if 
system is BSD.

Now I have
-- Looking for libv4l1-videodev.h
-- Looking for libv4l1-videodev.h - found
-- Looking for linux/videodev2.h
-- Looking for linux/videodev2.h - found

and tests are passed/entire project is builded. Is hardcoded directory 
includes considered evil and I should find (read - ask here :)) ) better 
solution ?

On 24.04.2016 12:00, Matthew D. Fuller wrote:
> On Sun, Apr 24, 2016 at 11:44:31AM +0300 I heard the voice of
> abi, and lo! it spake thus:
>> I go the first way, however it seems that include directory is ignored
>> in include tests.
> Oh, right.  That's annoying.
>
>
>> Should I try CMAKE_REQUIRED_INCLUDES ? However, I don't know the
>> effect of this on linux systems.
> I'd skip worrying about that for now.  Get a patch working for the
> port, then worry later about if/how to upstream it.
>
>      get_property(idirs DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY INCLUDE_DIRECTORIES)
>      set(CMAKE_REQUIRED_INCLUDES ${idirs})
>
> seems like it might do the trick.
>
>



More information about the freebsd-ports mailing list