SFML/cmake
friendlyanon 9b3735c05f Honor OPTIONAL_COMPONENTS when finding SFML
The "main" component is not available everywhere, but passing it to the
find_package(SFML) call via the OPTIONAL_COMPONENTS still fails the call
on platforms like Linux.

This commit enables SFML to be used the same in a cross-platform fashion
without forcing consumers to put custom logic around importing SFML.
Example that works with this commit, but break before:

    find_package(SFML REQUIRED graphics OPTIONAL_COMPONENTS main)
    target_link_libraries(dummy PRIVATE SFML::graphics)
    if(SFML_MAIN_FOUND)
      target_link_libraries(dummy PRIVATE SFML::main)
    endif()
2022-03-29 00:30:04 +02:00
..
Modules Rename FindVorbis -> FindVORBIS, for consistency with exported variables (e.g. VORBIS_FOUND) 2020-01-02 15:28:31 +01:00
toolchains Removed old android cmake toolchain 2019-01-09 15:22:49 +00:00
CompilerOptionsOverride.cmake Enable compiler warnings. 2021-11-30 11:25:58 +01:00
CompilerWarnings.cmake Merge branch '2.6.x' into feature/backmerge 2021-12-20 13:44:56 +01:00
Config.cmake Remove unused CMake variables 2022-02-17 23:24:02 +01:00
Macros.cmake Simplify how tests are built 2022-02-16 13:51:29 +00:00
SFMLConfig.cmake.in Honor OPTIONAL_COMPONENTS when finding SFML 2022-03-29 00:30:04 +02:00
SFMLConfigDependencies.cmake.in Add SFML:: namespace to targets 2022-01-11 22:27:39 +01:00