1
General / Re: SFML 2.5 CMake Migration
« on: June 11, 2018, 08:57:59 pm »
Been looking forward to this, however one niggle:
Code: [Select]
target_link_libraries(SFMLTest sfml-graphics sfml-audio)
This is fairly non-standard, given this:Code: [Select]
find_package(SFML 2.5 COMPONENTS graphics audio REQUIRED)
Then the `target_link_libraries` line should be this to be more cmake-standard:Code: [Select]
target_link_libraries(SFMLTest SFML::graphics SFML::audio)
Following C++ stylings/conventions, components of a package are namespaced via `::`. The first part should match the package name (same caps as well, thus all-caps in this case) and the second part should match the component name. If there are secondary variants (like choosing a specific audio system backend or so, not relevant in this case, just an example) then that is generally done via dashes (something like `SFML::audio-pulseaudio`, though this is less standardized as more components are generally preferred, and not relevant here anyway).