From owner-freebsd-ports@freebsd.org Sun Apr 24 09:09:56 2016 Return-Path: Delivered-To: freebsd-ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4267BB1913E for ; Sun, 24 Apr 2016 09:09:56 +0000 (UTC) (envelope-from abi@abinet.ru) Received: from mail.abinet.ru (mail.abinet.ru [136.243.72.227]) by mx1.freebsd.org (Postfix) with ESMTP id 0AB22183A for ; Sun, 24 Apr 2016 09:09:55 +0000 (UTC) (envelope-from abi@abinet.ru) Received: from [10.0.0.1] (unknown [10.0.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.abinet.ru (Postfix) with ESMTPSA id D972F191B0 for ; Sun, 24 Apr 2016 09:09:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=abinet.ru; s=dkim; t=1461488993; bh=27LWVKiTUe4mzQrs/eTicjSKa/k7fYGNmdUFRm8809k=; h=Date:From:To:Subject:References:In-Reply-To; b=AItToD9Mz+5yaCZzBTs8evLZ+mx7K6UqyZ5RWYRxR3gNbsMSYOaAp1YCAdrM7O5/N OD5oMs3ORL8h+/AHpa5Nflf2zfIEFzq6FAWuXfBtzIMFgH8bGvWj3fdsp9aSaFaE7K HugeQ91oxOXn+9J2PY/FSSu7m4CvcDcfMm1iXEYU= Message-ID: <571C8D61.6010200@abinet.ru> Date: Sun, 24 Apr 2016 12:09:53 +0300 From: abi User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:) Gecko/20160112 FossaMail/25.2.0 MIME-Version: 1.0 To: freebsd-ports@freebsd.org Subject: Re: Making a port - debugging cmake check_include_file References: <571BE034.9070200@abinet.ru> <20160423215530.GP83618@over-yonder.net> <571BF713.4040607@abinet.ru> <20160424071351.GQ83618@over-yonder.net> <571C876F.3040000@abinet.ru> <20160424090004.GT83618@over-yonder.net> In-Reply-To: <20160424090004.GT83618@over-yonder.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Apr 2016 09:09:56 -0000 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. > >