You are not logged in.

#1 2014-10-24 08:30:21

Registered: 2012-02-07
Posts: 34

Issues with cmake find_package and yaourt

Hey !

I'm working on a project that uses the cppnetlib.
On MacOS, I used brew to install the lib, and my CMakeFile works just fine.
On Arch, I used yaourt, and when it reaches the `find_package` line, here's what happens:

CMake Error at /usr/lib64/cmake/cppnetlib/cppnetlibTargets.cmake:61 (message):
  The imported target "cppnetlib-uri" references the file


Any idea why something's referencing yaourt's temporary folder ? And how I would fix that/prevent it in future occurences ?


#2 2014-10-24 16:14:38

From: Pasadena, CA
Registered: 2009-07-13
Posts: 17,585

Re: Issues with cmake find_package and yaourt

Moving to AUR issues

Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
How to Ask Questions the Smart Way


#3 2014-10-24 16:48:58

From: Benevento, Italy
Registered: 2013-10-27
Posts: 776

Re: Issues with cmake find_package and yaourt

Hi Plaristote,
I downloaded the PKGBUILD for ccp-netlib and after building the package, I can confirm that during the packaging process a file gets some references to the $pkgdir (that in your case is the yoaurt temporary directory). I left a comment with a possible fix on the cpp-netlib AUR page.
Meanwhile, you can edit the PKGBUILD and add the following code to the end of the package() function

for _file in $(find ${pkgdir}/usr/lib/cmake/cppnetlib -type f -name "*.cmake");
  sed -i -e "s|${pkgdir}/usr/lib64|${_basedir}/usr/lib|g" $_file

registered linux user #588260github

-- When you have eliminated the impossible, whatever remains, however improbable, must be the truth -- Spock | Sherlock Holmes


Board footer

Powered by FluxBB