exiv2: fix CMake export paths

This commit is contained in:
Thomas Tuegel 2020-07-16 10:41:32 -05:00 committed by Milan
parent 0143a1fad0
commit f1a58aba15

View File

@ -98,7 +98,7 @@ stdenv.mkDerivation rec {
(cd ../tests/ && python3 runner.py)
'';
# With cmake we have to enable samples or there won't be
# With CMake we have to enable samples or there won't be
# a tests target. This removes them.
postInstall = ''
( cd "$out/bin"
@ -108,6 +108,14 @@ stdenv.mkDerivation rec {
)
'';
# Fix CMake export paths.
postFixup = ''
sed -i "$dev/lib/cmake/exiv2/exiv2Config.cmake" \
-e "/INTERFACE_INCLUDE_DIRECTORIES/ s@\''${_IMPORT_PREFIX}@$dev@" \
-e "/Compute the installation prefix/ a set(_IMPORT_PREFIX \"$out\")" \
-e "/^get_filename_component(_IMPORT_PREFIX/ d"
'';
enableParallelBuilding = true;
meta = with stdenv.lib; {