FS#57972 - [sdl2] CMake Config not exported properly
Attached to Project:
Arch Linux
Opened by Guillaume Racicot (gracicot) - Monday, 26 March 2018, 16:44 GMT
Last edited by Sven-Hendrik Haase (Svenstaro) - Thursday, 29 March 2018, 19:02 GMT
Opened by Guillaume Racicot (gracicot) - Monday, 26 March 2018, 16:44 GMT
Last edited by Sven-Hendrik Haase (Svenstaro) - Thursday, 29 March 2018, 19:02 GMT
|
Details
Description: SDL2 exports a cmake config file that allows
other CMake projects to use SDL2
Right now, a cmake configuration is installed but incomplete. The new files generated by SDL2's CMakeLists.txt are more up to date and reflect the latest changes from SDL2. When installing SDL2, we should observe the following installed files: - /usr/lib/cmake/SDL2/SDL2Config.cmake - /usr/lib/cmake/SDL2/SDL2ConfigVersion.cmake - /usr/lib/cmake/SDL2/SDL2Targets.cmake - /usr/lib/cmake/SDL2/SDL2Targets-noconfig.cmake I attached the cmake config file for a typical SDL2 installation when building it with cmake. Additional info: * Version 2.0.8 Steps to reproduce: Install package Notice the lack of cmake config |
This task depends upon
Closed by Sven-Hendrik Haase (Svenstaro)
Thursday, 29 March 2018, 19:02 GMT
Reason for closing: Fixed
Thursday, 29 March 2018, 19:02 GMT
Reason for closing: Fixed
CMake Error at /usr/lib64/cmake/SDL2/SDL2Targets.cmake:97 (message):
The imported target "SDL2::SDL2-static" references the file
"/usr/lib/libSDL2.a"
but this file does not exist. Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
"/usr/lib64/cmake/SDL2/SDL2Targets.cmake"
but not all the files it references.
Call Stack (most recent call first):
/usr/lib64/cmake/SDL2/SDL2Config.cmake:1 (include)
tools/build/cmake/common_deps.cmake:34 (find_package)
CMakeLists.txt:25 (include)
Either SDL2Targets.cmake must be patched to remove this reference, or this package must ship /usr/lib/libSDL2.a.
CMake Error at /usr/lib64/cmake/SDL2/SDL2Targets.cmake:97 (message):
The imported target "SDL2::SDL2main" references the file
"/usr/lib/libSDL2main.ain.a"
but this file does not exist. Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
"/usr/lib64/cmake/SDL2/SDL2Targets.cmake"
but not all the files it references.
Call Stack (most recent call first):
/usr/lib64/cmake/SDL2/SDL2Config.cmake:1 (include)
tools/build/cmake/common_deps.cmake:34 (find_package)
CMakeLists.txt:25 (include)
-- Configuring incomplete, errors occurred!
See also "/home/fsecilia/dev/builds/voodoo/gcc/debug/CMakeFiles/CMakeOutput.log".
See also "/home/fsecilia/dev/builds/voodoo/gcc/debug/CMakeFiles/CMakeError.log".
I attached a patch for it, but it's probably easier just to edit the file.
I've attached a minimal project test whether finding the package, compiling, linking, and running succeed. It has a small readme and script to execute.
find_package(SDL2 REQUIRED)
target_link_libraries(example PUBLIC SDL2::SDL2)
I had to install ibus however. Is this a new dependency? Looking at the `SDL2Targets-noconfig.cmake` It adds `ibus-1.0` as link dependency. Removing the flag or installing ibus bith have worked for me.