sdl2-config.cmake.in


Log

Author Commit Date CI Message
Anonymous Maarten 653e433c 2022-09-27T03:15:04 cmake: only add -Wl,--undefined=WinMain when building an executable
Anonymous Maarten 8a08d62f 2022-09-05T21:53:50 cmake: fix location of SDL2::SDL2test imported library
Anonymous Maarten 5eb0f432 2022-08-24T04:14:52 cmake: always create SDL2::SDL2main target in autotools' cmake config script
Anonymous Maarten 996eb2ed 2022-08-21T04:03:32 cmake: add library directories & pthread to imported targets of sdl2-config.cmake This fixes linking to SDL2::SDL2-static on systems where external libraries such as X11 are not in a standard location. Pthread also needs special care.
Anonymous Maarten 53141a56 2022-08-09T22:05:03 Expand CMake documentation a bit (#5961) * cmake: remove duplicate check_required_components macro * Expand docs/README-cmake.md a bit * cmake: path needs `/` infix
Anonymous Maarten 65473ae3 2022-07-25T02:01:59 autoconf: use ax_compute_relative_paths
Anonymous Maarten db7dfece 2022-06-28T23:09:28 cmake: fix name+location of SDL2.dll in configure generated SDL2::SDL2 target
Anonymous Maarten 6d1dfc83 2022-06-15T04:29:14 cmake: make sure SDL2::SDL2 is always available
Simon McVittie 73215379 2022-06-13T11:51:41 cmake: Fix static linking to dependencies with "-" in library name When SDL is built with Wayland support on Linux, and Wayland libraries are linked as dependencies instead of being loaded with dlopen(), its dependencies will include libraries whose names contain a dash, like `-lwayland-client` and `-ldecor-0`. Don't replace such libraries with `-lwayland` and `-ldecor`: those don't exist and linking them will fail. Signed-off-by: Simon McVittie <smcv@collabora.com>
Anonymous Maarten 246f3ba5 2022-06-03T19:57:21 cmake: rewrite autotools' sdl2-config.cmake.in with IMPORTED targets + no more -lmingw32
Daniel Gibson 501fe465 2021-04-21T06:34:46 sdl2-config.cmake.in: Make SDL2::SDL2 work with MinGW, fixes #3665 It didn't work at all because shared libs defined in CMake with add_library() need something like IMPORTED_IMPLIB (pointing to a .dll.a or .lib for th DLLs) set to link on Windows. But even with that it didn't work because the order of the libs is very important: it must be -lmingw32 -lSDL2main -lSDL -mwindows - but with normal add_library(SDL2::SDL2 SHARED IMPORTED) libs, SDL2 itself is always linked first. So I use an "INTERFACE" library (usually used for header-only libs), which doesn't implicitly/automatically link anything so I can specify the whole order of the linked libs. (SDL2::SDL2-static is completely untested)
Daniel Gibson fac6e9f1 2021-04-21T06:27:41 sdl2-config.cmake.in: Use more CMake variables and less autotools ones this makes it easier to create a portable sdl2-config.cmake that doesn't hardcode its path (by replacing the hardcoded prefix with something like "${CMAKE_CURRENT_LIST_DIR}/../../..")
Daniel Gibson 3ea11f9a 2021-04-18T06:23:20 Make SDL2Config.cmake export SDL2_LIBRARIES etc (on Windows) still WIP and other platforms than windows still TODO and open questions etc see https://github.com/libsdl-org/SDL/issues/4004
James Le Cuirot 99f87a71 2020-04-11T23:38:34 build: Merge pkg-config Libs.private into Libs for static-only builds A project being built entirely statically will call pkg-config with --static, which utilises the Libs.private field. Conversely it will not use --static when not being built entirely statically, even if there is only a static build of SDL available. This will most likely cause the build to fail due to underlinking unless we merge the Libs fields. This is what the Meson build system does when it generates pkg-config files. This also also follows the behaviour of sdl2-config. At the same time, the runtime linker flags are not applicable to static-only builds so only add them for shared builds.
Flamefire ccc8c5d2 2020-03-17T08:46:34 Fix shared library suffix on OSX
Ryan C. Gordon dd1d8ab6 2020-02-21T15:52:35 cmake: more proper sdl2-config.cmake work (thanks, Alexander!) Fixes Bugzilla #4970.
Ryan C. Gordon be4d488e 2020-02-21T15:51:04 cmake: Backed out changeset 9009d85d3762 This is being replaced by a different patch (see Bugzilla #4970).
Ryan C. Gordon 229c2f8f 2020-02-14T13:37:32 cmake: Add PACKAGE_VERSION and SDL2_VERSION to sdl2-config.cmake.in Fixes Bugzilla #4970.
Sam Lantinga 5c1ab403 2016-10-07T15:08:37 Applied Ubuntu patch bug_822210_fix_sdl2-config.cmake_whitespace.patch
Ryan C. Gordon 2f592849 2015-12-28T23:29:11 Fixed typo in sdl2-config.cmake.in (thanks, Rafal!). Partially fixes Bugzilla #3208.
Sam Lantinga bf9bd59c 2015-06-29T22:24:00 Fixed bug 2464 - Configure a sdl2-config.cmake.in together with sdl2.pc.in Leonardo Despite having a CMakeLists.txt file, SDL2 seems to be mainly built using the autotools system by package-managers. It is nice to have it but it is only useful if you are building SDL2 by yourself. People that want to use CMake to find their already-installed SDL2 are using a FindSDL2.cmake module based on the old FindSDL.cmake. This is not deprecated but it is discouraged by the CMake devs (see http://www.cmake.org/Bug/view.php?id=14826), as these modules needs maintainers to be included in the official CMake installation. To fix that, SDL and its accompanying libraries could configure a simple sdl2-config.cmake file, much like it does with sdl2.pc.in. We don't need to configure a full sdl2-config.cmake as in this post, http://forums.libsdl.org/viewtopic.php?t=10068&sid=ccf8abbf0d73fb03ae9cded991e60959 (because it depends on it being built with CMake). Using something as simple as http://www.cmake.org/Wiki/CMake/Tutorials/Packaging#Package_Configuration_Files is deemed enough. Here is another: http://quickgit.kde.org/?p=prison.git&a=blob&f=lib%2Fprison%2FPrisonConfig.cmake.in