Hello!
I am having issues with the FindSFML.cmake and i am not sure if it is me doing something wrong or the file itself not working. I want to link to SFML in my project, on both windows and linux. On linux it works fine, but on windows it fails (using mingw).
In the CMakeLists.txt I use the following to find SFML:
find_package(SFML 2 COMPONENTS window system REQUIRED)
This works fine on linux, but on windows i get the following error:
Could NOT find SFML (missing: SFML_WINDOW_LIBRARY SFML_SYSTEM_LIBRARY)
I built SFML from the source using mingw with the default settings, followed by a "make install" which installed SFML to the default location in programs (x86).
Despite this, i managed to get it to run by calling:
find_package(SFML REQUIRED)
include_directories("${SFML_INCLUDE_DIR}")
link_directories("${SFML_INCLUDE_DIR}/../lib")
...and then linking to the libs manually (i.e. sfml-window sfml-graphics etc)
So even if it works, it seems to me like it isn't the way it should be. Any ideas on something i am doing wrong, or is this actually an issue with the find module?
Thanks.