Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMake: INTERFACE_LIBRARY targets may only have whitelisted properties. #103

Closed
teodly opened this issue Sep 5, 2022 · 2 comments
Closed
Labels

Comments

@teodly
Copy link
Contributor

teodly commented Sep 5, 2022

When following the build instructions, the following errors appear:

-- The CXX compiler identification is GNU 9.4.0
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for C++ include pthread.h
-- Looking for C++ include pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Check if compiler accepts -pthread
-- Check if compiler accepts -pthread - yes
-- Found Threads: TRUE  
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1") 
-- Checking for module 'libavcodec'
--   Found libavcodec, version 58.54.100
-- Checking for module 'libavformat'
--   Found libavformat, version 58.29.100
-- Checking for module 'libavdevice'
--   Found libavdevice, version 58.8.100
-- Checking for module 'libavutil'
--   Found libavutil, version 56.31.100
-- Checking for module 'libavfilter'
--   Found libavfilter, version 7.57.100
-- Checking for module 'libswscale'
--   Found libswscale, version 5.5.100
-- Checking for module 'libpostproc'
--   Found libpostproc, version 55.5.100
-- Checking for module 'libswresample'
--   Found libswresample, version 3.5.100
-- Libs: avcodec | avcodec
CMake Error at cmake/FindFFmpeg.cmake:166 (set_target_properties):
  INTERFACE_LIBRARY targets may only have whitelisted properties.  The
  property "IMPORTED_LINK_INTERFACE_MULTIPLICITY" is not allowed.
Call Stack (most recent call first):
  CMakeLists.txt:31 (find_package)


-- Libs: avformat | avformat
CMake Error at cmake/FindFFmpeg.cmake:166 (set_target_properties):
  INTERFACE_LIBRARY targets may only have whitelisted properties.  The
  property "IMPORTED_LINK_INTERFACE_MULTIPLICITY" is not allowed.
Call Stack (most recent call first):
  CMakeLists.txt:31 (find_package)


-- Libs: avutil | avutil
CMake Error at cmake/FindFFmpeg.cmake:166 (set_target_properties):
  INTERFACE_LIBRARY targets may only have whitelisted properties.  The
  property "IMPORTED_LINK_INTERFACE_MULTIPLICITY" is not allowed.
Call Stack (most recent call first):
  CMakeLists.txt:31 (find_package)


-- Libs: avdevice | avdevice
CMake Error at cmake/FindFFmpeg.cmake:166 (set_target_properties):
  INTERFACE_LIBRARY targets may only have whitelisted properties.  The
  property "IMPORTED_LINK_INTERFACE_MULTIPLICITY" is not allowed.
Call Stack (most recent call first):
  CMakeLists.txt:31 (find_package)


-- Libs: avfilter | avfilter
CMake Error at cmake/FindFFmpeg.cmake:166 (set_target_properties):
  INTERFACE_LIBRARY targets may only have whitelisted properties.  The
  property "IMPORTED_LINK_INTERFACE_MULTIPLICITY" is not allowed.
Call Stack (most recent call first):
  CMakeLists.txt:31 (find_package)


-- Libs: swscale | swscale
CMake Error at cmake/FindFFmpeg.cmake:166 (set_target_properties):
  INTERFACE_LIBRARY targets may only have whitelisted properties.  The
  property "IMPORTED_LINK_INTERFACE_MULTIPLICITY" is not allowed.
Call Stack (most recent call first):
  CMakeLists.txt:31 (find_package)


-- Libs: swresample | swresample
CMake Error at cmake/FindFFmpeg.cmake:166 (set_target_properties):
  INTERFACE_LIBRARY targets may only have whitelisted properties.  The
  property "IMPORTED_LINK_INTERFACE_MULTIPLICITY" is not allowed.
Call Stack (most recent call first):
  CMakeLists.txt:31 (find_package)


-- Found FFmpeg: /usr/lib/x86_64-linux-gnu/libavcodec.so;avcodec;/usr/lib/x86_64-linux-gnu/libavformat.so;avformat;/usr/lib/x86_64-linux-gnu/libavutil.so;avutil;/usr/lib/x86_64-linux-gnu/libavdevice.so;avdevice;/usr/lib/x86_64-linux-gnu/libavfilter.so;avfilter;/usr/lib/x86_64-linux-gnu/libswscale.so;swscale;/usr/lib/x86_64-linux-gnu/libswresample.so;swresample  
-- LIBS:  / 
-- /home/teo/tly/avcpp-git/tests/../catch2/contrib
-- Configuring incomplete, errors occurred!

Reverting commit 4629a90 fixes the problem and avcpp compiles successfully. I'm using CMake 3.16.3.

@h4tr3d
Copy link
Owner

h4tr3d commented Sep 20, 2022

@teowoz, sorry, but I can't reproduce issue... currently my CMake is 3.24 but CMake configuration mostly stable for a long time. Could you please check with more newer version of CMake?

@jonas-resch
Copy link
Contributor

jonas-resch commented May 20, 2023

This is definitely related to the CMake version.
It doesn't work with CMake 3.16.3 (the latest version I could update to on Ubuntu Server 20.04).
It works on CMake 3.25.1 and 3.26.3.

Edit: CMake 3.19.0 is the minimum required version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants