majintao0131 / yaml-cpp

Automatically exported from code.google.com/p/yaml-cpp
MIT License
0 stars 0 forks source link

DESTDIR not supported in the makefiles #75

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
In a makefile based project it's pretty much standard to set DESTDIR if you 
want to install into a temporary directory (to be able to generate a package 
for example). Even cmake should support it 
(http://cmake.org/Wiki/CMake_FAQ#Does_CMake.27s_.22make_install.22_support_DESTD
IR.3F). However, yaml-cpp fails:

$ make install DESTDIR=$HOME/files
[ 79%] Built target yaml-cpp
[ 96%] Built target run-tests
[100%] Built target parse
Install the project...
-- Install configuration: ""
CMake Error at cmake_install.cmake:36 (FILE):
  file called with relative DESTINATION.  This does not make sense when using
  DESTDIR.  Specify absolute path or remove DESTDIR environment variable.

make: *** [install] Error 1

Original issue reported on code.google.com by Tomas.Ca...@gmail.com on 27 Aug 2010 at 11:57

GoogleCodeExporter commented 9 years ago
That's not a YAML-CPP problem.

Please specify DESTDIR as an absolute path (e.g. /home/user/files), then CMake 
will not complain about it.

Original comment by matthias...@gmail.com on 8 Feb 2011 at 10:50

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
$HOME is an absolute path...

Original comment by Tomas.Ca...@gmail.com on 9 Feb 2011 at 12:05

GoogleCodeExporter commented 9 years ago
Can you confirm that $HOME is an absolute path? (What's the output to `echo 
$HOME`?) I tried exactly this:

make install DESTDIR=$HOME/files

where my $HOME expands to /Users/beder, and it works properly. Plus, the error 
message you show is awfully suspiciously indicating that CMake thinks it got a 
relative path.

(As a side note, what version of yaml-cpp are you using?)

Original comment by jbe...@gmail.com on 2 Mar 2011 at 5:11

GoogleCodeExporter commented 9 years ago
If you've fixed this, or it's still a problem, please reopen this. Otherwise, I 
can't reproduce it, so I'm just closing it.

Original comment by jbe...@gmail.com on 13 Sep 2011 at 7:43