Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - OvermindDL1

Pages: [1]
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).

Pages: [1]
anything