libde265 icon indicating copy to clipboard operation
libde265 copied to clipboard

Fix installing de265-version.h with CMake

Open theirix opened this issue 3 years ago • 7 comments

File de265-version.h cannot be properly installed in out-of-source builds because it is listed in libde265_headers.

Reproducing:

mkdir build && cd build && cmake -DCMAKE_INSTALL_PREFIX=/tmp/libde265-inst .. && make && make install

theirix avatar Oct 31 '20 09:10 theirix

This might conflict with b415d34ca4dd5b81a6fed62e31551e9d5ee27e5e.

farindk avatar Nov 02 '20 16:11 farindk

Hm, I've tried your command line for reproducing the issue, but it works fine for me (Ubuntu 18.04). The de265-version.h is installed correctly.

farindk avatar Nov 02 '20 16:11 farindk

First part of the problem (installing de265-version.h) was already fixed in commit a49dc4effee9a84b50fabdadd9654802a55e8722 (released in 1.0.8) so I am dropping this part.

Second part of the problem (see error below) is reproduced using the command in description (make sure to remove created dirs) and is addressed in a new version of PR:

Install the project...
-- Install configuration: ""
-- Installing: /tmp/libde265-inst/lib/liblibde265.dylib
-- Installing: /tmp/libde265-inst/include/libde265/acceleration.h
-- Installing: /tmp/libde265-inst/include/libde265/alloc_pool.h
-- Installing: /tmp/libde265-inst/include/libde265/bitstream.h
-- Installing: /tmp/libde265-inst/include/libde265/cabac.h
-- Installing: /tmp/libde265-inst/include/libde265/configparam.h
CMake Error at libde265/cmake_install.cmake:54 (file):
  file INSTALL cannot find
  "/Users/irix/projects/libs/libde265/libde265/de265-version.h": No such file
  or directory.
Call Stack (most recent call first):
  cmake_install.cmake:42 (include)

theirix avatar Nov 02 '20 16:11 theirix

Build failure is due to Homebrew timeout. I can bump PR if it is needed.

theirix avatar Nov 03 '20 10:11 theirix

This affects me on Windows, using VS 2019. I can confirm that applying the proposed change fixes the issue for me.

ArturKovacs avatar Jan 14 '21 21:01 ArturKovacs

I wonder why extra/libde265/de265-version.h exists..

igo95862 avatar Oct 18 '21 11:10 igo95862

I wonder why extra/libde265/de265-version.h exists..

it is needed for MSVC builds (see libde265/Makefile.vc7) which do not generate de265-version.h by the call to configure_file on Linux/macOS

theirix avatar Jan 29 '23 18:01 theirix