← All tasks
cppSFML/SFML #3504Not a task: not reproduced

CMake macro sfml_add_library fails when setting SFML_INSTALL_PKGCONFIG_FILES

envgap__SFML__SFML-3504

01 / FAILURE SIGNATURE

As reported upstream

install FILES given no DESTINATION!
Not a benchmark task.
  • In a clean container the reported failure did not reproduce, or the known fix did not make the project run.

02 / ENVIRONMENT RECIPE

Base commit
a31daf16b7a1b9c7e41d504100b9729e809286fb
Manifest
CMakeLists.txt
Reproduce
Awaiting issue-specific recipe
Run under trace
Awaiting a meaningful runtime command

03 / ORIGINAL ISSUE TEXT

SFML/SFML #3504 · read the original issue
### Prerequisite Checklist

- [x] I searched for [existing issues](https://github.com/search?q=repo%3ASFML%2FSFML&type=issues) to prevent duplicates
- [x] I searched for [existing discussions on the forum](https://www.google.com/search?q=site%3Ahttps%3A%2F%2Fen.sfml-dev.org) to prevent duplicates
- [x] I am here to report an issue and not to just ask a question or look for help (use the [forum](https://en.sfml-dev.org/forums/index.php#c3) or [Discord](https://discord.gg/nr4X7Fh) instead)

### Describe your issue here

Since commit e5127715e64af362e8665500285da1a2c48d71a4, adding cmake flag `-DSFML_INSTALL_PKGCONFIG_FILES=TRUE` raises errors:
```
$ cmake -S ./ -B build -DSFML_INSTALL_PKGCONFIG_FILES=TRUE
-- The C compiler identification is GNU 13.3.0
-- The CXX compiler identification is GNU 13.3.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE  
CMake Error at cmake/Macros.cmake:246 (install):
  install FILES given no DESTINATION!
Call Stack (most recent call first):
  src/SFML/System/CMakeLists.txt:72 (sfml_add_library)


CMake Error at cmake/Macros.cmake:246 (install):
  install FILES given no DESTINATION!
Call Stack (most recent call first):
  src/SFML/Window/CMakeLists.txt:269 (sfml_add_library)


-- Found X11: /usr/include  found components: Xrandr Xcursor Xi 
-- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so
-- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Found OpenGL: /usr/lib/x86_64-linux-gnu/libOpenGL.so  found components: OpenGL 
-- libudev stable: 1
-- Found UDev: /usr/lib/x86_64-linux-gnu/libudev.so
--    include: /usr/include
-- Found UDev: /usr/include  
-- Performing Test ATOMIC_TEST
-- Performing Test ATOMIC_TEST - Success
CMake Error at cmake/Macros.cmake:246 (install):
  install FILES given no DESTINATION!
Call Stack (most recent call first):
  src/SFML/Network/CMakeLists.txt:43 (sfml_add_library)


CMake Error at cmake/Macros.cmake:246 (install):
  install FILES given no DESTINATION!
Call Stack (most recent call first):
  src/SFML/Graphics/CMakeLists.txt:88 (sfml_add_library)


-- Found Freetype: /usr/lib/x86_64-linux-gnu/libfreetype.so  
-- Found Vorbis: /usr/include  
-- Found FLAC: /usr/lib/x86_64-linux-gnu/libFLAC.so  
CMake Error at cmake/Macros.cmake:246 (install):
  install FILES given no DESTINATION!
Call Stack (most recent call first):
  src/SFML/Audio/CMakeLists.txt:165 (sfml_add_library)


-- Configuring incomplete, errors occurred!
```

### Your Environment

- OS / distro / window manager: Ubuntu 22.04
- SFML version: 3.0.1
- Compiler / toolchain: GCC
- Special compiler / CMake flags: -S ./ -B build -DSFML_INSTALL_PKGCONFIG_FILES=TRUE


### Steps to reproduce

none

### Expected behavior

This shouldn't fail as in 3.0.0

### Actual behavior

fails with various errors as reported above
Continue on GitHub ↗

04 / LABELS

Labels from the report text only; not yet run

No supported category has been assigned.

Label rules and the text that matched
[]