From owner-freebsd-ports@freebsd.org Sat Apr 23 22:28:38 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 AA148B1A0AA for ; Sat, 23 Apr 2016 22:28:38 +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 7347F1EE0 for ; Sat, 23 Apr 2016 22:28:38 +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 32ADF19BA4 for ; Sat, 23 Apr 2016 22:28:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=abinet.ru; s=dkim; t=1461450516; bh=j5iPYwcbEBy3kF8bBaa1OMG/YekmV3UfCE+tfp1/sTk=; h=Date:From:To:Subject:References:In-Reply-To; b=Wh52uEmrn/fOod0JihoDyEWX6548XspeIBsbubb5iUpxIdr8jAVj+PfJpsu/Io0I3 mN5TtN9JjmBe/fYqChwqZoaSAU6fnWWrVFfTk2VZ614DmoFks09P4JlCTKUlUhbou2 mmBYQEQmSeFUFU4PJhVtcmK1OzNSi/Iu+MS8ifXE= Message-ID: <571BF713.4040607@abinet.ru> Date: Sun, 24 Apr 2016 01:28:35 +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> In-Reply-To: <20160423215530.GP83618@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: Sat, 23 Apr 2016 22:28:38 -0000 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 >> ^ >> 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(). > > >